T
Tomski
Hi,
My public variables can't be referenced by sub routines in my modules.
The two msgboxes in the code below display them correctly.
Public newDataSheet As Worksheet
Public nikkeiTime As Date
Private Sub Workbook_Open()
Set newDataSheet = Workbooks("Historic Data").Worksheets("NewData")
nikkeiTime = "00:00:05"
MsgBox nikkeiTime
MsgBox newDataSheet.name
Application.OnTime Now + TimeValue("00:00:01"), "runSchedule"
End Sub
However the msgboxes in runSchdule are blank, code shown below
Sub runSchedule()
MsgBox nikkeiTime
MsgBox newDataSheet.name
End Sub
Can anybody help me with this one please?
Thanks
T
My public variables can't be referenced by sub routines in my modules.
The two msgboxes in the code below display them correctly.
Public newDataSheet As Worksheet
Public nikkeiTime As Date
Private Sub Workbook_Open()
Set newDataSheet = Workbooks("Historic Data").Worksheets("NewData")
nikkeiTime = "00:00:05"
MsgBox nikkeiTime
MsgBox newDataSheet.name
Application.OnTime Now + TimeValue("00:00:01"), "runSchedule"
End Sub
However the msgboxes in runSchdule are blank, code shown below
Sub runSchedule()
MsgBox nikkeiTime
MsgBox newDataSheet.name
End Sub
Can anybody help me with this one please?
Thanks
T