LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open workbook macro- find correct month to open?


So I have Monthly sales sheets that import my cash register data int
them. I wanted to set them up to do everything without being there.
So I have my task manager open excel at 9:30pm everyday and it runs th
macro to import the data into the correct day of the month. Here is th
workbook open macro-
Code
-------------------
Private Sub Workbook_Open()
Dim dTime As Date
dTime = Time
If dTime = TimeValue("9:30 PM") And _
dTime < TimeValue("9:40 PM") Then
ImportData
End If
End Sub[\code]

This is in my July spreadsheet only. So is there a way to make it know which month spreadsheet to open on the 1st of the month? So come August 1st it will automatically open the August workbook and input the data for the first day? By using the date? Thanks so much

--
buzzharle
-----------------------------------------------------------------------
buzzharley's Profile: http://www.excelforum.com/member.php...fo&userid=3588
View this thread: http://www.excelforum.com/showthread.php?threadid=55947

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
How to find file-path of open workbook? Larryq22 Excel Discussion (Misc queries) 7 January 24th 08 03:38 AM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
Find and Open Workbook then copy and move sheet cwilson Excel Programming 0 February 2nd 05 07:29 PM
How to find if a workbook is open Amir Excel Programming 4 January 27th 04 10:26 PM


All times are GMT +1. The time now is 03:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"