Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change Private to Public Sub Worksheet_Activate()
Private Sub Workbook_Open() Set ws = Sheet1 ' or Worksheets("Sheet1") On Error GoTo errH If ws Is ActiveSheet Then Call ws.Worksheet_Activate End If Exit Sub errH: If Err = 438 Then Debug.Print ws.Name; "_Worksheet_Activate doesn't exist " & _ "or is Private" Else Debug.Print Err.Description End If End Sub If you want to call the activate event on any sheet that happens to be active as the workbook opens start with - ws = activesheet There are probably better ways to acheive the same overall objective Regards, Peter T "Robert Crandal" wrote in message ... I have 5 sheets that each process "Worksheet_Activate()". When my workbook first opens, Sheet1 is automatically selected by default as the first active sheet, however it does not receive any "Activate" event when the workbook is first loaded. What is a good way to ensure that the default activated sheet's "Worksheet_Activate()" handler is called?? thank you! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Activate Object question | Excel Worksheet Functions | |||
Activate Object question | Excel Worksheet Functions | |||
ThisWorkbook.Activate Question | Excel Programming | |||
Return to Current Sheet in On (sheet activate) event macro | Excel Programming | |||
Worksheet.activate question | Excel Programming |