Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Current Control Object ?
When working with UserForms I normally assign the current control object
(CCO) to an object variable for ease of use, i.e.: _________________________________ Private Sub OptionButton1_Click() Dim CCO As Object Set CCO = OptionButton1 If CCO.Value = False Then CCO.ForeColor = 5 End If End Sub ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Now I'm wondering if it is possible to set this object variable without actually know the name of the control??? Maybe something like: _________________________________ Dim CCO As Object Set CCO = ThisControl.Name ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Hope I've made my explaning clear enough - or to put it short: Is there a way of knowing what control the current control macro is for? TIA, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2 Label Options - Forms Object vs Control Box Object | Excel Discussion (Misc queries) | |||
How to force selection of all current text in textbox control onentry? | Excel Programming | |||
Object doesn't support current locale setting: 'setlocale' | Excel Programming | |||
Can I control Macro run automatically current worksheet? | Excel Programming | |||
Can't save chart as object in current sheet | Charts and Charting in Excel |