Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The spreadsheet contains x number of possible data sets to chart. A userform is dynamically created that contains x number of checkboxes. How do I find out which check box(es) were selected? The problem is that the number of data sets/checkboxes can vary depending upon which spreadsheet is opened. On a seperate note, why is it different code to show a dynamically created userform than one created in the VBE? VBA.UserForms.Add(VBComp.Name).Show vs. UserForm1.Show Thank you. -- SupC ------------------------------------------------------------------------ SupC's Profile: http://www.excelforum.com/member.php...o&userid=23941 View this thread: http://www.excelforum.com/showthread...hreadid=376054 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
assume fForm is a reference to your userform
dim cbx as MSForms.Checkbox for each c in fForm.Components if typeof c is msforms.checkbox then set cbx = c msgbox c.Name & "is checked: " & cbx.Value end if Next -- Regards, Tom Ogilvy "SupC" wrote in message ... The spreadsheet contains x number of possible data sets to chart. A userform is dynamically created that contains x number of checkboxes. How do I find out which check box(es) were selected? The problem is that the number of data sets/checkboxes can vary depending upon which spreadsheet is opened. On a seperate note, why is it different code to show a dynamically created userform than one created in the VBE? VBA.UserForms.Add(VBComp.Name).Show vs. UserForm1.Show Thank you. -- SupC ------------------------------------------------------------------------ SupC's Profile: http://www.excelforum.com/member.php...o&userid=23941 View this thread: http://www.excelforum.com/showthread...hreadid=376054 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Tom, I tried the code but I get a compile error on the For Each line that says: Compile Error: Method or data member not found Regards, Sup -- SupC ------------------------------------------------------------------------ SupC's Profile: http://www.excelforum.com/member.php...o&userid=23941 View this thread: http://www.excelforum.com/showthread...hreadid=376054 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can a Combobox in a Userform access multiple dynamic tables | Excel Discussion (Misc queries) | |||
How do I set values from a userform | Excel Programming | |||
Dynamic update of UserForm TextBox | Excel Programming | |||
How to create a dynamic Userform via VBA | Excel Programming | |||
Dynamic Text boxes in UserForm | Excel Programming |