LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 Label Options - Forms Object vs Control Box Object Awrex Excel Discussion (Misc queries) 3 July 17th 09 07:10 PM
How to force selection of all current text in textbox control onentry? Chrisso Excel Programming 2 November 25th 07 09:55 PM
Object doesn't support current locale setting: 'setlocale' Martin Eckart[_2_] Excel Programming 0 May 17th 05 09:41 AM
Can I control Macro run automatically current worksheet? Microlong Excel Programming 2 March 2nd 05 12:39 PM
Can't save chart as object in current sheet Ann Scharpf Charts and Charting in Excel 1 December 3rd 04 11:24 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright İ2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"