LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Finding and Activating the first blank cell

Ignore the suggestion about combining all in the Worksheet_Activate event,
it will only fire when the sheet is activated, not when the workbook opens.

Putting all in in Auto_Open in a normal module as per your latest post is
also fine, but if you also want the first empty cell in col-A to be
activated when switching back also include the Worksheet_Change event.

Regards,
Peter T


"Peter T" <peter_t@discussions wrote in message
...
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





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Next Blank Cell in Blank Row Nick Wakeham Excel Worksheet Functions 3 June 11th 08 02:15 PM
Finding next non-blank cell Stu[_2_] Excel Discussion (Misc queries) 4 October 23rd 07 01:29 PM
Finding Worksheet and Activating it Rob Excel Discussion (Misc queries) 2 January 30th 07 08:14 PM
Finding blank cell Mario_Party Excel Programming 3 January 31st 06 04:10 PM
Finding first non-blank cell Allison[_2_] Excel Programming 7 October 18th 03 01:47 AM


All times are GMT +1. The time now is 08:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"