ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application Level Events Question (https://www.excelbanter.com/excel-programming/304187-application-level-events-question.html)

nickg420[_4_]

Application Level Events Question
 
I've written a macro that's triggered by an the Workbook_Ope
Application Level Event that I want to run when any workbook on m
server is opened by one of our network users.

The only problem is will this work for all users on my network
Secondly where do I open the workbook in which Application Level Macr
is written in order for the application level events to fire?

Any help is greatly appreciated

--
Message posted from http://www.ExcelForum.com


Dick Kusleika[_3_]

Application Level Events Question
 
Nick

The applications reside on the users' machines, so each user will have to
open the workbook that contains the application level event code. The best
way to handle this is to create an add-in and have all the users install it.
Then it will be available whenever they are running Excel. It doesn't have
to be an add-in, but it will be easier to distribute if it is.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"nickg420 " wrote in message
...
I've written a macro that's triggered by an the Workbook_Open
Application Level Event that I want to run when any workbook on my
server is opened by one of our network users.

The only problem is will this work for all users on my network?
Secondly where do I open the workbook in which Application Level Macro
is written in order for the application level events to fire?

Any help is greatly appreciated.


---
Message posted from http://www.ExcelForum.com/




nickg420[_5_]

Application Level Events Question
 
I was thiniking add in too the only problem would be that this macr
password protects each sheet of the workbook when it opens. So the onl
problem with that is when it is neccessary to edit a workbook they can
because as soon as it's opened by Excel it's password protected.

Is there some way to limit the Application Level Events to a specifi
folder of workbooks, i.e. if it's not opened from a certain path the
don't trigger the events. Could this be done with a simple I
statement? Any Help would be greatly Appreciated!

N

--
Message posted from http://www.ExcelForum.com


Dick Kusleika[_3_]

Application Level Events Question
 
NG

Is there some way to limit the Application Level Events to a specific
folder of workbooks, i.e. if it's not opened from a certain path then
don't trigger the events. Could this be done with a simple IF
statement? Any Help would be greatly Appreciated!


Yes, a simple If could do that.

If Wb.Path = "\\Server\c" Then
'Do stuff
End If

Wb is the argument to the Workbook_Open application level event.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com






All times are GMT +1. The time now is 03:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com