View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
buzzharley[_11_] buzzharley[_11_] is offline
external usenet poster
 
Posts: 1
Default Open workbook macro- find correct month to open?


Thanks so much for your help Jim- Where should I put it in the macro? I
assume it would be in the first macro?


Workbook_Open()
If DatePart("m", Date) = "1" Then
Sheets("Jan").select ' or however you have named the January sheet
elseif DatePart("m",Date) = "2" then
Sheets("Feb").select
'through the twelve months

Dim dTime As Date
dTime = Time
If dTime = TimeValue("9:30 PM") And _
dTime < TimeValue("9:40 PM") Then
ImportData
End If
End Sub


--
buzzharley
------------------------------------------------------------------------
buzzharley's Profile: http://www.excelforum.com/member.php...o&userid=35886
View this thread: http://www.excelforum.com/showthread...hreadid=559474