View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default How to code VBA: Auto open workbook and run macro

This is the easy part. Just select the file you want to run and set the
date to whenever you want it run.

http://support.microsoft.com/default.aspx/kb/308569

--
HTH,
Barb Reinhardt



"March" wrote:

Thank you to reply.

My question is between

Private Sub Workbook_Open()


End Sub

My understanding now is when I use Workbook_Open( ) in my workbook,
everytime when I open excel this workbook should be auto opened. Am I right?
If yes, I don't want the workbook open all time I open excel. I need it to
open only at 2:00 pm. So this point I don't know how to tell excel to open
the file at the fixed time.

I am not sure that "How excel knows which file should be opened????"


March


"Barb Reinhardt" wrote:

In the VBE, use a Workbook_Open macro to define what you want done when the
workbook is opened. Once the workbook is created, you can use your Windows
Scheduled tasks to open it at 2 PM and it should run.

Do you have specific questions on how to code something?
--
HTH,
Barb Reinhardt



"March" wrote:

Hello all,

I need to create excel vba in order to auto open workbook in specific time.
I setup Windows Scheduled Tasks to open excel everyday for example at 2:00
pm. I need the workbook to open at this time too and run macros. After the
job done, I want to send email to my email to say that job is finished.

I don't know what to start. Please give me suggestion.


March