#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 92
Default Macro Execution

This should be simple, but I cannot find an example.

What I want to do, is every morning, at 3:00 AM, auto execute a macro that
will rename data files. The reason for this is that another auto-executed
routine will be downloading new data into my system from another location
and likes to use the same filename every day.

In a blank spreadsheet, I've written the procedure that accomplishes the
renaming, but am at a lose as to how to auto execute it, when the sheet is
opened. Since I am unfamiliar with the world of object oriented programming,
example coding is the best way to get me started. Thank you.

I am now off looking for a way to schedule the spreadsheet to be opened
every morning at 3.

Any ideas?

Craig


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Macro Execution

You will find example code showing you how to do this he

http://www.cpearson.com/excel/OnTime.aspx

Hope this helps.

Pete

On Jul 12, 9:46 pm, "C Brandt" wrote:
This should be simple, but I cannot find an example.

What I want to do, is every morning, at 3:00 AM, auto execute a macro that
will rename data files. The reason for this is that another auto-executed
routine will be downloading new data into my system from another location
and likes to use the same filename every day.

In a blank spreadsheet, I've written the procedure that accomplishes the
renaming, but am at a lose as to how to auto execute it, when the sheet is
opened. Since I am unfamiliar with the world of object oriented programming,
example coding is the best way to get me started. Thank you.

I am now off looking for a way to schedule the spreadsheet to be opened
every morning at 3.

Any ideas?

Craig



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Macro Execution

You could use Windows Task Scheduler to fire up Excel and your workbook at
3:00am.

The workbook would have workbook_open code to run the macro.

Private Sub Workbook_Open()
macroname or code goes here
End Sub

Entered in Thisworkbook module.

Or in a general module

Sub Auto_Open()
macroname or code goes here
End Sub

You could add to your code to close Excel when done

Application.Quit


Gord Dibben MS Excel MVP

On Thu, 12 Jul 2007 15:46:27 -0500, "C Brandt" wrote:

This should be simple, but I cannot find an example.

What I want to do, is every morning, at 3:00 AM, auto execute a macro that
will rename data files. The reason for this is that another auto-executed
routine will be downloading new data into my system from another location
and likes to use the same filename every day.

In a blank spreadsheet, I've written the procedure that accomplishes the
renaming, but am at a lose as to how to auto execute it, when the sheet is
opened. Since I am unfamiliar with the world of object oriented programming,
example coding is the best way to get me started. Thank you.

I am now off looking for a way to schedule the spreadsheet to be opened
every morning at 3.

Any ideas?

Craig


Reply
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
getting a simple macro to begin execution on the selected cell bolchman Excel Discussion (Misc queries) 2 February 2nd 07 08:59 PM
Naming a range during macro execution Kevryl Excel Discussion (Misc queries) 2 December 11th 06 10:08 AM
How to automatic calculation and macro execution between 3 workbooks? c Excel Worksheet Functions 1 July 22nd 05 05:38 AM
Create a button to continue old macro execution Brian Excel Discussion (Misc queries) 0 May 15th 05 10:22 PM
Password required before Macro execution Andy Tallent Excel Discussion (Misc queries) 4 February 4th 05 03:05 PM


All times are GMT +1. The time now is 04:01 PM.

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

About Us

"It's about Microsoft Excel"