#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Timed Macro

I have some code that I run every Saturday and Sunday at 2:00pm in a
Workbook.

Is it possible to somehow automatically run this macro without the
workbook being actually open and without me actually been present?

I would have the exact Date and Time that I want it to run at in a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not all
the historic files too.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Timed Macro

Start Settings Control Panel Scheduled Tasks
--
Gary''s Student
gsnu200711


"Sean" wrote:

I have some code that I run every Saturday and Sunday at 2:00pm in a
Workbook.

Is it possible to somehow automatically run this macro without the
workbook being actually open and without me actually been present?

I would have the exact Date and Time that I want it to run at in a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not all
the historic files too.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Timed Macro

Sean wrote:

I have some code that I run every Saturday and Sunday at 2:00pm in a
Workbook.

Is it possible to somehow automatically run this macro without the
workbook being actually open and without me actually been present?

I would have the exact Date and Time that I want it to run at in a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not all
the historic files too.


You could use the Windows Scheduler to open the workbook. You'll have to
turn off macro security on that computer.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Timed Macro

On Mar 19, 8:38 am, Damien McBain wrote:
Sean wrote:
I have some code that I run every Saturday and Sunday at 2:00pm in a
Workbook.


Is it possible to somehow automatically run this macro without the
workbook being actually open and without me actually been present?


I would have the exact Date and Time that I want it to run at in a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not all
the historic files too.


You could use the Windows Scheduler to open the workbook. You'll have to
turn off macro security on that computer.


How would I use the schedule task to run code within my Excel file?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Timed Macro

Sean

You code would be placed into a Workbook_Open Sub which will run when Task
Scheduler starts Excel with your workbook.


Gord Dibben MS Excel MVP

On 19 Mar 2007 05:18:44 -0700, "Sean" wrote:

On Mar 19, 8:38 am, Damien McBain wrote:
Sean wrote:
I have some code that I run every Saturday and Sunday at 2:00pm in a
Workbook.


Is it possible to somehow automatically run this macro without the
workbook being actually open and without me actually been present?


I would have the exact Date and Time that I want it to run at in a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not all
the historic files too.


You could use the Windows Scheduler to open the workbook. You'll have to
turn off macro security on that computer.


How would I use the schedule task to run code within my Excel file?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 454
Default Timed Macro

On Mar 19, 4:53 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Sean

You code would be placed into a Workbook_Open Sub which will run when Task
Scheduler starts Excel with your workbook.

Gord Dibben MS Excel MVP

On 19 Mar 2007 05:18:44 -0700, "Sean" wrote:



On Mar 19, 8:38 am, Damien McBain wrote:
Sean wrote:
I have some code that I run every Saturday and Sunday at 2:00pm in a
Workbook.


Is it possible to somehow automatically run this macro without the
workbook being actually open and without me actually been present?


I would have the exact Date and Time that I want it to run at in a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not all
the historic files too.


You could use the Windows Scheduler to open the workbook. You'll have to
turn off macro security on that computer.


How would I use the schedule task to run code within my Excel file?- Hide quoted text -


- Show quoted text -


Thanks Gordon

Is it as simple as that? I thought with schedule task you had to
create a Batch file?

So I place my code in Workbook_Open sub, select my file on a New
Schedule Task, select time / date etc and that its?

I assume Excel application doesn't have do be open (or does it?) and
all I need to ensure is my PC's on?

Thanks

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Timed Macro

One easy method would be to stick the workbook in your XLSTART folder and set up
Task Scheduler to just start Excel.

Or point task scheduler to a short cut like

"C:\Program Files\Microsoft Office\Exceldata\12months.xls"

You will have to enter a Windows login password if you use one.

See Help and Support "schedule tasks" for more info on how to set up a scheduled
task.


Gord

On 19 Mar 2007 10:31:48 -0700, "Sean" wrote:

On Mar 19, 4:53 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Sean

You code would be placed into a Workbook_Open Sub which will run when Task
Scheduler starts Excel with your workbook.

Gord Dibben MS Excel MVP

On 19 Mar 2007 05:18:44 -0700, "Sean" wrote:



On Mar 19, 8:38 am, Damien McBain wrote:
Sean wrote:
I have some code that I run every Saturday and Sunday at 2:00pm in a
Workbook.


Is it possible to somehow automatically run this macro without the
workbook being actually open and without me actually been present?


I would have the exact Date and Time that I want it to run at in a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not all
the historic files too.


You could use the Windows Scheduler to open the workbook. You'll have to
turn off macro security on that computer.


How would I use the schedule task to run code within my Excel file?- Hide quoted text -


- Show quoted text -


Thanks Gordon

Is it as simple as that? I thought with schedule task you had to
create a Batch file?

So I place my code in Workbook_Open sub, select my file on a New
Schedule Task, select time / date etc and that its?

I assume Excel application doesn't have do be open (or does it?) and
all I need to ensure is my PC's on?

Thanks


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Timed Macro

Hi,

I am also stuck at this problem. What if the file is already updated in a
network server. As a result, i cannot access to this file from the Xlstart.
Anyother thing is our IT dept has also closed off the access to xlstart in my
C drive. So therefore i need to use another method, perhaps to write a macro
in the editor to activate this timed macro. But i am clueless as to what to
write. Can anyone advise what code to start with?

thanks,
Junior


"Gord Dibben" wrote:

One easy method would be to stick the workbook in your XLSTART folder and set up
Task Scheduler to just start Excel.

Or point task scheduler to a short cut like

"C:\Program Files\Microsoft Office\Exceldata\12months.xls"

You will have to enter a Windows login password if you use one.

See Help and Support "schedule tasks" for more info on how to set up a scheduled
task.


Gord

On 19 Mar 2007 10:31:48 -0700, "Sean" wrote:

On Mar 19, 4:53 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Sean

You code would be placed into a Workbook_Open Sub which will run when Task
Scheduler starts Excel with your workbook.

Gord Dibben MS Excel MVP

On 19 Mar 2007 05:18:44 -0700, "Sean" wrote:



On Mar 19, 8:38 am, Damien McBain wrote:
Sean wrote:
I have some code that I run every Saturday and Sunday at 2:00pm in a
Workbook.

Is it possible to somehow automatically run this macro without the
workbook being actually open and without me actually been present?

I would have the exact Date and Time that I want it to run at in a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not all
the historic files too.

You could use the Windows Scheduler to open the workbook. You'll have to
turn off macro security on that computer.

How would I use the schedule task to run code within my Excel file?- Hide quoted text -

- Show quoted text -


Thanks Gordon

Is it as simple as that? I thought with schedule task you had to
create a Batch file?

So I place my code in Workbook_Open sub, select my file on a New
Schedule Task, select time / date etc and that its?

I assume Excel application doesn't have do be open (or does it?) and
all I need to ensure is my PC's on?

Thanks



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Timed Macro

You say "Anyother thing is our IT dept has also closed off the access to
xlstart in my C drive".
Whilst I imagine this would be possible, are you sure this is the case ?
Such a restrictive environment would make most attempts at development
difficult to say the least.
Excel also has an alternate, but trying to circumvent IT restrictions may
not be a good idea:
?Application.AltStartupPath

But maybe you should get IT to free up your system if you are expected work
with <advanced Excel capabilities.

NickHK

"Junior728" wrote in message
...
Hi,

I am also stuck at this problem. What if the file is already updated in a
network server. As a result, i cannot access to this file from the

Xlstart.
Anyother thing is our IT dept has also closed off the access to xlstart in

my
C drive. So therefore i need to use another method, perhaps to write a

macro
in the editor to activate this timed macro. But i am clueless as to what

to
write. Can anyone advise what code to start with?

thanks,
Junior


"Gord Dibben" wrote:

One easy method would be to stick the workbook in your XLSTART folder

and set up
Task Scheduler to just start Excel.

Or point task scheduler to a short cut like

"C:\Program Files\Microsoft Office\Exceldata\12months.xls"

You will have to enter a Windows login password if you use one.

See Help and Support "schedule tasks" for more info on how to set up a

scheduled
task.


Gord

On 19 Mar 2007 10:31:48 -0700, "Sean" wrote:

On Mar 19, 4:53 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Sean

You code would be placed into a Workbook_Open Sub which will run when

Task
Scheduler starts Excel with your workbook.

Gord Dibben MS Excel MVP

On 19 Mar 2007 05:18:44 -0700, "Sean" wrote:



On Mar 19, 8:38 am, Damien McBain wrote:
Sean wrote:
I have some code that I run every Saturday and Sunday at 2:00pm

in a
Workbook.

Is it possible to somehow automatically run this macro without

the
workbook being actually open and without me actually been

present?

I would have the exact Date and Time that I want it to run at in

a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not

all
the historic files too.

You could use the Windows Scheduler to open the workbook. You'll

have to
turn off macro security on that computer.

How would I use the schedule task to run code within my Excel file?-

Hide quoted text -

- Show quoted text -

Thanks Gordon

Is it as simple as that? I thought with schedule task you had to
create a Batch file?

So I place my code in Workbook_Open sub, select my file on a New
Schedule Task, select time / date etc and that its?

I assume Excel application doesn't have do be open (or does it?) and
all I need to ensure is my PC's on?

Thanks





  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Timed Macro

Hi Nick,

Thanks. How do i use the Application.AltStartupPath then? i am not very
familiar with this.

Junior

"NickHK" wrote:

You say "Anyother thing is our IT dept has also closed off the access to
xlstart in my C drive".
Whilst I imagine this would be possible, are you sure this is the case ?
Such a restrictive environment would make most attempts at development
difficult to say the least.
Excel also has an alternate, but trying to circumvent IT restrictions may
not be a good idea:
?Application.AltStartupPath

But maybe you should get IT to free up your system if you are expected work
with <advanced Excel capabilities.

NickHK

"Junior728" wrote in message
...
Hi,

I am also stuck at this problem. What if the file is already updated in a
network server. As a result, i cannot access to this file from the

Xlstart.
Anyother thing is our IT dept has also closed off the access to xlstart in

my
C drive. So therefore i need to use another method, perhaps to write a

macro
in the editor to activate this timed macro. But i am clueless as to what

to
write. Can anyone advise what code to start with?

thanks,
Junior


"Gord Dibben" wrote:

One easy method would be to stick the workbook in your XLSTART folder

and set up
Task Scheduler to just start Excel.

Or point task scheduler to a short cut like

"C:\Program Files\Microsoft Office\Exceldata\12months.xls"

You will have to enter a Windows login password if you use one.

See Help and Support "schedule tasks" for more info on how to set up a

scheduled
task.


Gord

On 19 Mar 2007 10:31:48 -0700, "Sean" wrote:

On Mar 19, 4:53 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Sean

You code would be placed into a Workbook_Open Sub which will run when

Task
Scheduler starts Excel with your workbook.

Gord Dibben MS Excel MVP

On 19 Mar 2007 05:18:44 -0700, "Sean" wrote:



On Mar 19, 8:38 am, Damien McBain wrote:
Sean wrote:
I have some code that I run every Saturday and Sunday at 2:00pm

in a
Workbook.

Is it possible to somehow automatically run this macro without

the
workbook being actually open and without me actually been

present?

I would have the exact Date and Time that I want it to run at in

a
cell, say A1. Reason I have this is that I use a new copy of the
workbook each week, so I only want the current file to run, not

all
the historic files too.

You could use the Windows Scheduler to open the workbook. You'll

have to
turn off macro security on that computer.

How would I use the schedule task to run code within my Excel file?-

Hide quoted text -

- Show quoted text -

Thanks Gordon

Is it as simple as that? I thought with schedule task you had to
create a Batch file?

So I place my code in Workbook_Open sub, select my file on a New
Schedule Task, select time / date etc and that its?

I assume Excel application doesn't have do be open (or does it?) and
all I need to ensure is my PC's on?

Thanks







  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Timed Macro

You can see if it set with this. If not, you can set it to a suitable
folder.

Private Sub CommandButton1_Click()
Dim TempStr As String

TempStr = Application.AltStartupPath

If TempStr = "" Then
TempStr = "Not Set"
End If

MsgBox "AltStartupPath is: " & TempStr

End Sub

Or manually with ToolsOptionGeneral"At startup, open all file in:"

NickHK

"Junior728" wrote in message
...
Hi Nick,

Thanks. How do i use the Application.AltStartupPath then? i am not very
familiar with this.

Junior

"NickHK" wrote:

You say "Anyother thing is our IT dept has also closed off the access to
xlstart in my C drive".
Whilst I imagine this would be possible, are you sure this is the case ?
Such a restrictive environment would make most attempts at development
difficult to say the least.
Excel also has an alternate, but trying to circumvent IT restrictions

may
not be a good idea:
?Application.AltStartupPath

But maybe you should get IT to free up your system if you are expected

work
with <advanced Excel capabilities.

NickHK

"Junior728" wrote in message
...
Hi,

I am also stuck at this problem. What if the file is already updated

in a
network server. As a result, i cannot access to this file from the

Xlstart.
Anyother thing is our IT dept has also closed off the access to

xlstart in
my
C drive. So therefore i need to use another method, perhaps to write a

macro
in the editor to activate this timed macro. But i am clueless as to

what
to
write. Can anyone advise what code to start with?

thanks,
Junior


"Gord Dibben" wrote:

One easy method would be to stick the workbook in your XLSTART

folder
and set up
Task Scheduler to just start Excel.

Or point task scheduler to a short cut like

"C:\Program Files\Microsoft Office\Exceldata\12months.xls"

You will have to enter a Windows login password if you use one.

See Help and Support "schedule tasks" for more info on how to set up

a
scheduled
task.


Gord

On 19 Mar 2007 10:31:48 -0700, "Sean"

wrote:

On Mar 19, 4:53 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Sean

You code would be placed into a Workbook_Open Sub which will run

when
Task
Scheduler starts Excel with your workbook.

Gord Dibben MS Excel MVP

On 19 Mar 2007 05:18:44 -0700, "Sean"

wrote:



On Mar 19, 8:38 am, Damien McBain

wrote:
Sean wrote:
I have some code that I run every Saturday and Sunday at

2:00pm
in a
Workbook.

Is it possible to somehow automatically run this macro

without
the
workbook being actually open and without me actually been

present?

I would have the exact Date and Time that I want it to run

at in
a
cell, say A1. Reason I have this is that I use a new copy of

the
workbook each week, so I only want the current file to run,

not
all
the historic files too.

You could use the Windows Scheduler to open the workbook.

You'll
have to
turn off macro security on that computer.

How would I use the schedule task to run code within my Excel

file?-
Hide quoted text -

- Show quoted text -

Thanks Gordon

Is it as simple as that? I thought with schedule task you had to
create a Batch file?

So I place my code in Workbook_Open sub, select my file on a New
Schedule Task, select time / date etc and that its?

I assume Excel application doesn't have do be open (or does it?)

and
all I need to ensure is my PC's on?

Thanks







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
internet connection via excel macro at timed intervels & save data to excel file. Sam Excel Worksheet Functions 1 July 22nd 07 06:08 AM
timed macro Decreenisi Excel Worksheet Functions 3 March 3rd 06 12:33 PM
How can I automate a macro to run in timed intervals Randc Excel Programming 2 July 26th 05 06:57 PM
Timed Macros? Smonczka Excel Programming 2 June 14th 05 09:45 PM
timed macro alan_bourne[_21_] Excel Programming 3 November 26th 03 11:44 AM


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