Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: macro

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Somebody created this macro for me to add information from one page and drop it onto another page each time as user add information which basically should create a small database. The macro was working fine but it doesnt seem to be working any more any help would be appericated, thanks

    Sheet16_start = "B1" 'Start Cell for Second Sheet.
    Sheet16.Activate

    Range(Sheet16_start).Activate

    Cell = "foo" 'creates a tmp value for loop
    Range(Sheet16_start).Activate

    'Keeps going through until blank cell is found
    Do Until Cell = ""
    Cell = ActiveCell.Text
    If Cell <> "" Then
    ActiveCell.Offset(0, 1).Select
    End If
    Loop

    For i = 1 To 20 '20 being the number of cells to copy
    Sheet26.Activate
    Sheet26.Range("B" & i).Select 'Go to the cell dicated to the loop
    txt = Sheet26.Range("B" & i).Text 'select the cell
    Sheet16.Activate
    ActiveCell.Value = txt
    ActiveCell.Offset(1, 0).Select
    Next

    Sheet1.Activate
    End Sub

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Perth Australia
    Posts
    1,584
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Freddie
    In what way is the macro not working? Does it do anything? Does it display a runtime error message? What line does the code break on? What might you have changed that prevents the code from running,like changing sheet names etc, or using it on a different operating system eg from NT4 to Windows2000?
    If you post this, someone will probably know the answer.
    regards
    Derek

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    It says it has a compile error and it cant find the project or library even though I havent changed the sheet name. The sheet name is 5 but the sheet number is 16 if that makes sense. Anyways I was told to use the sheet number for the macro. The OS is Me and im using office XP if that helps thanks

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •