View Single Post
  #13   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

"Hang up and I'll call you back"...<g..........I was just in the middle of a
post back to you.......ok good now that you've got it sorted.......have a
good one, and thanks for the feedback........

Vaya con Dios,
Chuck, CABGx3




"Marie Bayes" wrote:

Ignore my last post, I put it into a module and it ran fine, thanks so much
for your help, much appreciated.

"Marie Bayes" wrote:

Spoke to soon, the macro that starts running opens another workbook, this now
tries to run the job again when it opens, do you know how I ensure that this
'on open' only works for the current workbook?

"CLR" wrote:

Ok, get back to us when you can check it out..........it's a little tricky
until you've done it a few times....

Have a good day,

Vaya con Dios,
Chuck, CABGx3



"Marie Bayes" wrote:

I thought that's what i did, not at the right computer right now, but will
double check, thanks.

"CLR" wrote:

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