I have created a pricing grid, and are using a database query to populate the grid. I want users to not be able to touch this query. But everytime I protect the worksheet the query will not run.. Is there anything I can do. I have tried everything
Unprotect in your code before any change method is executed. Then Protect after all change methods are executed.
Skip,
[sub] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get... Neopolitan Blownapart! [/sub]
The problem I have with that is, that the Database query will be run many times during a day, with different parameters being entered by the users. I need to protect the worksheet once and not have to worry about it again.
Is the query executed within a macro or from a change event?
Skip,
[sub] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get... Neopolitan Blownapart! [/sub]
well stick the protect / unprotect in the change event then !!
Other than that, have a look at the userinterfaceonly argument of the protection method - this will allow code to run whilst at the tsame time making the sheet protected from user interference.
Rgds, Geoff
"Three things are certain: Death, taxes and lost data. Guess which has occurred"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.