Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run macro at specified time

Can someone please tell me how:-

1. Auto save a spreadsheet at a particular time or interval

2. Run a macro at a particular time.

Cheers


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Run macro at specified time

Mushy,

You may want to play with Application.OnTime

Sub ScheduleMe()
Application.OnTime Now() + TimeValue("00:00:05"), "RunMe"
End Sub

Sub RunMe()
Beep
ScheduleMe
End Sub


Rob

"mushy_peas " wrote in message
...
Can someone please tell me how:-

1. Auto save a spreadsheet at a particular time or interval

2. Run a macro at a particular time.

Cheers


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Run macro at specified time

See www.cpearson.com/excel/ontime.htm for example code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"mushy_peas " wrote
in message ...
Can someone please tell me how:-

1. Auto save a spreadsheet at a particular time or interval

2. Run a macro at a particular time.

Cheers


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run macro at specified time

im sure i saw somewhere where it was really ease, it was just like one
line. basically do this at this time and that was it.

Chips, that all looked too much for me little brain too habdle. Hmm oh
well, i'll see.

Thanks anyway :O)


---
Message posted from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Run macro at specified time

Maybe you didn't see my first post?:

Mushy,

You may want to play with Application.OnTime

Sub ScheduleMe()
Application.OnTime Now() + TimeValue("00:00:05"), "RunMe"
End Sub

Sub RunMe()
Beep
ScheduleMe
End Sub


Rob


"mushy_peas " wrote in message
...
im sure i saw somewhere where it was really ease, it was just like one
line. basically do this at this time and that was it.

Chips, that all looked too much for me little brain too habdle. Hmm oh
well, i'll see.

Thanks anyway :O)


---
Message posted from http://www.ExcelForum.com/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run macro at specified time

hello Rob,
sorry, i did see your post and i did play with it.

It makes a beeping sound after 5 seconds repeatldy. Which is very
useful thank you.

I want something that will run at !7:00 every day, regarless of when
the application is firsted used.

I could figure an easy way to do that.


---
Message posted from http://www.ExcelForum.com/

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Run macro at specified time

Application.OnTime TimeValue("07:00:00"), "my_Procedure"

mushy_peas < wrote:

hello Rob,
sorry, i did see your post and i did play with it.

It makes a beeping sound after 5 seconds repeatldy. Which is very
useful thank you.

I want something that will run at !7:00 every day, regarless of when
the application is firsted used.

I could figure an easy way to do that.


---
Message posted from http://www.ExcelForum.com/




--
42°57N 81°16W



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run macro at specified time

cheers crash, that look like it will do the tric

--
Message posted from http://www.ExcelForum.com

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Run macro at specified time

It should

Here is an addin you should have .

http://www.rondebruin.nl/Google.htm

You should also look into stopping the macro.

just type ontime into the Help search box in the VBA

Jon


mushy_peas < wrote:

cheers crash, that look like it will do the trick


---
Message posted from http://www.ExcelForum.com/




--
42°57N 81°16W


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run macro at specified time

is there a way to set a macro to run at a particular date?

--
Message posted from http://www.ExcelForum.com



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Run macro at specified time

Mushy,

Sub test()
Application.OnTime CDate("1-Feb-2004"), "RunMe"
End Sub

Sub RunMe()
Beep
End Sub

Rob

"mushy_peas " wrote in message
...
is there a way to set a macro to run at a particular date??


---
Message posted from http://www.ExcelForum.com/



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Run macro at specified time

That is an interesting concept - have you tested it? The help would seem to
indicate otherwise.

Schedules a procedure to be run at a specified time in the future (either at
a specific time of day or after a specific amount of time has passed).

Neither seems to indicate a date would be acceptable (a number greater than
1), but I will admit I have never tested it.

--
Regards,
Tom Ogilvy

Rob van Gelder wrote in message
...
Mushy,

Sub test()
Application.OnTime CDate("1-Feb-2004"), "RunMe"
End Sub

Sub RunMe()
Beep
End Sub

Rob

"mushy_peas " wrote in message
...
is there a way to set a macro to run at a particular date??


---
Message posted from http://www.ExcelForum.com/





  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Run macro at specified time

Tom,

You're right - the documentation does seem to indicate arguments should be
Time values only.

DateTimes work too - maybe this is an undocumented feature ;)

Rob


"Tom Ogilvy" wrote in message
...
That is an interesting concept - have you tested it? The help would seem

to
indicate otherwise.

Schedules a procedure to be run at a specified time in the future (either

at
a specific time of day or after a specific amount of time has passed).

Neither seems to indicate a date would be acceptable (a number greater

than
1), but I will admit I have never tested it.

--
Regards,
Tom Ogilvy

Rob van Gelder wrote in message
...
Mushy,

Sub test()
Application.OnTime CDate("1-Feb-2004"), "RunMe"
End Sub

Sub RunMe()
Beep
End Sub

Rob

"mushy_peas " wrote in

message
...
is there a way to set a macro to run at a particular date??


---
Message posted from http://www.ExcelForum.com/







  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Run macro at specified time

When you reschedule, you'll need to calculate the next Monday, Tuesday,
Saturday or whatever day you want the macro to run.

Be aware that OnTime does not persist after you've closed Excel. The macro
only runs if Excel is running too.
You need to reset OnTime every time you open the workbook.

Rob


"mushy_peas " wrote in message
...
how about days of the week
for example i want to run a particualr marco at diff times in the days
depending if its Mon - Thurs, and another for Sat-Sun


---
Message posted from http://www.ExcelForum.com/



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
Macro / function text time to 24hr excel time passed midnight fortotaling hr's Russmaz Excel Worksheet Functions 2 March 6th 09 04:58 AM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
How do I set macro to run at specified time? Tom Robertson Excel Worksheet Functions 1 May 28th 06 03:42 PM
Can I get a macro to run at a certain time of day? Nick123 Excel Discussion (Misc queries) 2 July 27th 05 11:31 AM


All times are GMT +1. The time now is 03:06 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"