Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Finding Next Blank Cell in Blank Row | Excel Worksheet Functions | |||
Finding next non-blank cell | Excel Discussion (Misc queries) | |||
Finding Worksheet and Activating it | Excel Discussion (Misc queries) | |||
Finding blank cell | Excel Programming | |||
Finding first non-blank cell | Excel Programming |