Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Macro to run on file open

Hi

Is there a way to start a macro running as soon as a file opens?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Macro to run on file open


Private Sub Workbook_Open()
Call YourMacroName
End Sub

hth
Vaya con Dios,
Chuck, CABGx3


"Marie Bayes" wrote:

Hi

Is there a way to start a macro running as soon as a file opens?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Macro to run on file open

This needs to be put in the ThisWorkbook module.

--
Don Guillett
SalesAid Software

"CLR" wrote in message
...

Private Sub Workbook_Open()
Call YourMacroName
End Sub

hth
Vaya con Dios,
Chuck, CABGx3


"Marie Bayes" wrote:

Hi

Is there a way to start a macro running as soon as a file opens?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Macro to run on file open

Yup, I forgot to mention it...........thanks for the catch Don.

Vaya con Dios,
Chuck, CABGx3



"Don Guillett" wrote:

This needs to be put in the ThisWorkbook module.

--
Don Guillett
SalesAid Software

"CLR" wrote in message
...

Private Sub Workbook_Open()
Call YourMacroName
End Sub

hth
Vaya con Dios,
Chuck, CABGx3


"Marie Bayes" wrote:

Hi

Is there a way to start a macro running as soon as a file opens?

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Macro to run on file open

Thanks

"CLR" wrote:

Yup, I forgot to mention it...........thanks for the catch Don.

Vaya con Dios,
Chuck, CABGx3



"Don Guillett" wrote:

This needs to be put in the ThisWorkbook module.

--
Don Guillett
SalesAid Software

"CLR" wrote in message
...

Private Sub Workbook_Open()
Call YourMacroName
End Sub

hth
Vaya con Dios,
Chuck, CABGx3


"Marie Bayes" wrote:

Hi

Is there a way to start a macro running as soon as a file opens?

Thanks






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 84
Default Macro to run on file open

Hi

Thanks for that, I've put this into a module, when I run it, all works fine,
but when I open my spreadsheet, nothing happens, is there something else I
need to do?

"CLR" wrote:

Yup, I forgot to mention it...........thanks for the catch Don.

Vaya con Dios,
Chuck, CABGx3



"Don Guillett" wrote:

This needs to be put in the ThisWorkbook module.

--
Don Guillett
SalesAid Software

"CLR" wrote in message
...

Private Sub Workbook_Open()
Call YourMacroName
End Sub

hth
Vaya con Dios,
Chuck, CABGx3


"Marie Bayes" wrote:

Hi

Is there a way to start a macro running as soon as a file opens?

Thanks




  #7   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Macro to run on file open

That's what Don was saying.........are you sure you put it in the
"ThisWorkbook" module?
Right-click on a Tab, ViewCode then double-click on the "ThisWorkbook"
module and paste in the right hand window.

Vaya con Dios,
Chuck, CABGx3



"Marie Bayes" wrote:

Hi

Thanks for that, I've put this into a module, when I run it, all works fine,
but when I open my spreadsheet, nothing happens, is there something else I
need to do?

"CLR" wrote:

Yup, I forgot to mention it...........thanks for the catch Don.

Vaya con Dios,
Chuck, CABGx3



"Don Guillett" wrote:

This needs to be put in the ThisWorkbook module.

--
Don Guillett
SalesAid Software

"CLR" wrote in message
...

Private Sub Workbook_Open()
Call YourMacroName
End Sub

hth
Vaya con Dios,
Chuck, CABGx3


"Marie Bayes" wrote:

Hi

Is there a way to start a macro running as soon as a file opens?

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
Open a group of files in speadsheed on the same book jose_luis_fdez_diaz Excel Discussion (Misc queries) 3 October 9th 06 04:28 PM
Macro syntax to open file in current explorer folder [email protected] Excel Discussion (Misc queries) 4 January 11th 06 12:07 PM
How to stop file open macro prompt after deleting all macros? twor57 Excel Worksheet Functions 2 November 29th 05 05:00 PM
cannot open excel file, please help!!! sunlite Excel Discussion (Misc queries) 0 September 5th 05 05:29 PM
Macro to open specific File tamato43 Excel Discussion (Misc queries) 4 May 18th 05 09:42 PM


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