Results 1 to 6 of 6
  1. #1

    Default Microsoft Excel VBA Macro


    Guys,

    I am still learning this one...could you please help me out with how to output the result to the next worksheet...

    I have this one and it outputs the data on the active worksheet sheets (1) then the next data is encoded on the next column :

    Private Sub OKCommandButton1_Click()

    Dim emptyRow As Long

    'Make List Active
    Sheets(1).Activate

    'Determine emptyRow
    emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1


    'Export Data to worksheet
    Cells(emptyRow, 1).Value = ActivityNameTextBox.Value

    If ActivityCheckBox1.Value = True Then Cells(emptyRow, 2).Value = ActivityCheckBox1.Caption
    If ActivityCheckBox2.Value = True Then Cells(emptyRow, 2).Value = Cells(emptyRow, 2).Value & " " & ActivityCheckBox2.Caption

    ...

  2. #2

    Default Re: Microsoft Excel VBA Macro

    what is the problem?

  3. #3

    Default Re: Microsoft Excel VBA Macro

    You should know the worksheet index (name, or value) inorder for you to output it to the another sheet. ex:

    'Sheet1
    ''whatever you select on a drop down in sheet1 will appear inf sheet2

    sheet2.range("A1").value2=sheet1.combobox.text

  4. #4

    Default Re: Microsoft Excel VBA Macro

    Try this one bay...

    ActiveWorkbook.Sheets("Sheet2").Cells(1, 1).Value = "Look Mom! No Hands!"

    Instead of ActiveWorkBook you could use a specific Opened Workbooks instead like
    Workbooks("Your_Workbook_Name.xls").Sheets("Your_T arget_Sheet").Cells(Row_Num,Column_Num).Value

    Hope it helps.

  5. #5

    Default Re: Microsoft Excel VBA Macro

    Quote Originally Posted by jryan View Post
    Try this one bay...

    ActiveWorkbook.Sheets("Sheet2").Cells(1, 1).Value = "Look Mom! No Hands!"

    Instead of ActiveWorkBook you could use a specific Opened Workbooks instead like
    Workbooks("Your_Workbook_Name.xls").Sheets("Your_T arget_Sheet").Cells(Row_Num,Column_Num).Value

    Hope it helps.
    This one should work. You can always omit the ActiveWorkbook if your macro resides on it.

  6. #6

    Default Re: Microsoft Excel VBA Macro

    i dont get ur prob bro..but try this..

    as kill me said, no need multiple declaration of your open workbook bcoz i quess you dont need to open another workbook9in you case)..especify only the name of the sheets..examine below if it is correct or basin duol2x na..LOL

    ActiveWorkbook.Sheets("Sheet1").Cells(1, 1).Value = ActiveWorkbook.Sheets("Sheet2").Cells(1, 1).Value

  7.    Advertisement

Similar Threads

 
  1. Replies: 16
    Last Post: 04-11-2013, 07:41 PM
  2. Import Excel VBA macro to Open Office 3 Calc
    By cliff_drew in forum Programming
    Replies: 1
    Last Post: 09-10-2010, 12:00 PM
  3. need help on microsoft excel
    By PiaKurda in forum Programming
    Replies: 4
    Last Post: 07-16-2009, 09:35 AM
  4. HELP: Microsoft Excel
    By lallele in forum Software & Games (Old)
    Replies: 7
    Last Post: 10-05-2008, 11:31 AM
  5. HELP: Microsoft Excel
    By lallele in forum Computer Hardware
    Replies: 2
    Last Post: 10-04-2008, 07:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top