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: 1
Default PROBLEM: Keywords;= Userform, Class Modules, ButtonGroup and Nomenclature


I have a Userform with 48 commanbuttons created on the fly via
*ClassModule *named *BClass* and using Array holder *Btns()*.

As we would have it, it is possible to refer to any of th
CommandButtons (say the 15th button) as, by way of example, * Btn
(15).ButtonGroup.Caption *. But this is valid only when such referenc
is made from a *UserForm Module *or *General Module*.

When it is used in a Class Module, * Btns (15).ButtonGroup.Caption
fails, as does, *BClass.Btns(15).ButtonGroup.Caption*. In m
frustration, I have had to get by using a long-winded approach as:

For each ctl in UserForm1.Controls
If TypeOf ctl Is MsForms.CommandButton then
If ctl.Width =60 Then 'optional line
If ct.name ="CommandButton15"
Msgbox *ctl.Caption*
End if
End if
End if
Next

Now, going by the example, what *nomenclature* can be employed t
invoke -the caption of CommandButton15 -*from a Class Module*? the wa
we would use * Btns (15).ButtonGroup.Caption * from a UserFrom modul
or General module?


TIA

Myle

--
Myle
-----------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...fo&userid=2874
View this thread: http://www.excelforum.com/showthread.php?threadid=49731

 
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
Basic question - modules and class modules - what's the difference? Mark Stephens[_3_] Excel Programming 9 May 8th 05 11:48 AM
Problem with Userform and different code modules Jos Vens[_2_] Excel Programming 1 February 23rd 05 09:00 PM
When to code in sheet or userform modules and when to use modules Tony James Excel Programming 1 December 16th 04 10:02 PM
Userform with template class module problem Tom Ogilvy Excel Programming 1 July 18th 03 09:15 PM
Userform with template class module problem Tom Ogilvy Excel Programming 0 July 17th 03 06:38 PM


All times are GMT +1. The time now is 05:17 PM.

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

About Us

"It's about Microsoft Excel"