![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
why not just declare a public variable that stores the value of SetWarnings and then change it whenever you run a SetWarnings True/False? Then you can return the value anywhere you want. Sounds to me like you're making this infinitely harder than it really is. |
#4
| |||
| |||
|
|
Better yet, write a function to do it and always use that function to change it. E.g., make one optional parameter, and if you supply the parameter, set it accordingly, and set a static variable (internal to the function) to match the setting. When you want to know what the status is, you can call it without the optional argument and act on the returned value. This is basically a way of using a function as a property. You could define a custom property in a class module, but then you'd have to refer to it as part of the class module. Unless you've alredy got a class module in place for global settings, I'd go with the function. However, if you're using a class module for storing and setting the values of global settings, then it makes more sense to implement this as a property Let/Get. |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
I'm wondering if VB receives any event notice indicating that a confirmation dialog just opened? That is, can I tell if a confirmation dialog WAS encountered and then act on it? |
![]() |
| Thread Tools | |
| Display Modes | |
| |