View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Finding and Activating the first blank cell

Are you sure you put these in the correct modules, respectively
'ThisWorkbook' and the relevant worksheet module, as described in earlier
posts.

You may want to change -
Worksheets(1).etc to Worksheets("sheetname").etc unless sure your sheet will
always be the first worksheet.

Actually it wouldn't do any harm to combine both lines of code in the
Worksheet_Activate event (in the worksheet module) and dispense with the
Workbook_Open event, then you won't need to worry about sheet order or
anyone renaming the sheet.

Regards,
Peter T


wrote in message
ps.com...
Thanks for your help guys.

However, that code is not working :(

Private Sub Workbook_Open()
Worksheets(1).ScrollArea = "A1:G1000"
End Sub

Private Sub Worksheet_Activate()
Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Activate
End Sub

Is exactly what I have pasted in there, it seems like the macros never
run. I tried this before with some stuff I found and the only macro's
I've been able to successfully see run were the ones that ran each time
the selection changed. I'm using Excel 2003... and it doesn't seem to
matter what security level I set it at. It just doesnt' seem to run
either macro.

Any ideas?

Thanks,
Mike