I am once again new to Excel VBA not having had to program it for the last 15 years. Suddenly I find I must return to my former profession and find I have lost a lot of knowledge. (If I ever had it LOL) So I am basically a noob.
I am having an issue with activating a sheet from the workbook open process. Here is my opening code
Everything works great except the macro on the activated sheet never fires.
I never get the "Got to Worksheet" msg.
I am sure I am forgetting something simple
Any help is much appreciated.
Thanks to all
Wes
I am having an issue with activating a sheet from the workbook open process. Here is my opening code
VBA Code:
Private Sub workbook_open()
' MsgBox ("Workbook is Open")
Call MySaveAs
' Find Last row
'use End(xlUp) to determine Last Row with Data, in one column (column A)
'Rows.count returns the last row of the worksheet
lastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row
lastRow = lastRow + 1 ' found last row with data now point to next empty row
' MsgBox ("last Row is ") & lastRow
MsgBox ("Activate Sheet")
' Activate a Sheet
ThisWorkbook.Sheets("Sheet1").Activate
MsgBox ("activated sheet")
' break code here
' Stop
End Sub
Everything works great except the macro on the activated sheet never fires.
VBA Code:
Public Sub worksheet_activate()
MsgBox ("got to worksheet")
' MsgBox ("Format row")
Call formatrow
MsgBox ("Format Done")
' break code here
Stop
Call Get_Input
End Sub
I never get the "Got to Worksheet" msg.
I am sure I am forgetting something simple
Any help is much appreciated.
Thanks to all
Wes
Last edited by a moderator: