PcsTvW
04-05-2013, 03:06 AM
Hello,
Is there a way in VBA to, for example, get a msgbox when a random file is opened in Excel (Office2000)?
Just using:
Sub WorkBook_Open()
Msgbox "New file opened"
End Sub
...will not work because the code is placed in the ThisWorkBook section of a certain file and stored within this file itselves. So only when that file opens it comes with the msgbox. So in fact Excel needs to "monitor" whether a file opens and then give me msgbox.
So what code is needed and where do I place the code like the "ThisWorkBook-section" above or in a new module? I thought I need to store it in an Application environment or something but I'm not sure. Can someone help me out?
Thanks in advance,
Tim.
Is there a way in VBA to, for example, get a msgbox when a random file is opened in Excel (Office2000)?
Just using:
Sub WorkBook_Open()
Msgbox "New file opened"
End Sub
...will not work because the code is placed in the ThisWorkBook section of a certain file and stored within this file itselves. So only when that file opens it comes with the msgbox. So in fact Excel needs to "monitor" whether a file opens and then give me msgbox.
So what code is needed and where do I place the code like the "ThisWorkBook-section" above or in a new module? I thought I need to store it in an Application environment or something but I'm not sure. Can someone help me out?
Thanks in advance,
Tim.