Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To what extent does it matter where my code is? That is, whether the
code sits behind a worksheet, or in a module, or behind a userform? I assume that if I have controls on different objects with the same name, the code behind that object will control it. For example, if I have a "Show Instructions" button on a worksheet and a userform, both with the name ShowInstructions, then the ShowInstructions_Click() event behind the worksheet and the form will each respond to the button on the worksheet or form. But what about code in a module? Does VBA care if its in a module or a worksheet? Does it share values in a given object but not between objects? What exactly do the "public" and "private" statements do in regard to variables, and to objects and events? In the programming I have done, I've often been casual or careless about this stuff, and have usually been able to get it to work, but I'd like to understand better and make my programs better and cleaner, as well as more functional. Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Name Placement | Excel Discussion (Misc queries) | |||
Tab placement | Excel Discussion (Misc queries) | |||
Custom button, code placement | Excel Programming | |||
Placement of Code | Excel Programming | |||
Bar placement | Excel Programming |