ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Worksheet Open Event Q (https://www.excelbanter.com/excel-programming/383564-worksheet-open-event-q.html)

Sean

Worksheet Open Event Q
 
I have some code that will only open a Workbook if a User is listed
within a Named Range. The user is dependent on selecting a dropdown
within the file itself, thus "before the workbook is opened" this
value will be blank, to counter this I have a formula in the Named
Range that says if The User cell is blank, return the applications
username, thus it gets past the situation where its the incorrect user
temporarily, or so I thought, the Workbook has to Open in order to
refresh this formula

Any ideas of how I could get around this, in essense anyone should be
able to open the file, but when the User is selected, the rules kick
in

Thanks


Gary''s Student

Worksheet Open Event Q
 
To by-pass the "RULE", set the security level of Excel to enable the by-pass
of all macro functions.
--
Gary's Student
gsnu200707


"Sean" wrote:

I have some code that will only open a Workbook if a User is listed
within a Named Range. The user is dependent on selecting a dropdown
within the file itself, thus "before the workbook is opened" this
value will be blank, to counter this I have a formula in the Named
Range that says if The User cell is blank, return the applications
username, thus it gets past the situation where its the incorrect user
temporarily, or so I thought, the Workbook has to Open in order to
refresh this formula

Any ideas of how I could get around this, in essense anyone should be
able to open the file, but when the User is selected, the rules kick
in

Thanks



Alan[_2_]

Worksheet Open Event Q
 
Hide the sheets and open it to a userform. Put code in the userform to check
the name and if OK unhide the sheets and close the form, otherwise msgbox,
You are not unauthorized to open this document. Put an close event that
rehides the sheets. Just a thought.

Regards,

Alan


"Sean" wrote in message
oups.com...
I have some code that will only open a Workbook if a User is listed
within a Named Range. The user is dependent on selecting a dropdown
within the file itself, thus "before the workbook is opened" this
value will be blank, to counter this I have a formula in the Named
Range that says if The User cell is blank, return the applications
username, thus it gets past the situation where its the incorrect user
temporarily, or so I thought, the Workbook has to Open in order to
refresh this formula

Any ideas of how I could get around this, in essense anyone should be
able to open the file, but when the User is selected, the rules kick
in

Thanks





All times are GMT +1. The time now is 06:49 AM.

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