Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
using version 2003.
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim ctrl as Control
for each ctrl in Userform1.Controls if typeof ctrl is MSforms.OptionButton then ctrl.Value = False end if Next -- Regards, Tom Ogilvy "JaxPM" wrote: using version 2003. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm a newbie. I tried pasting the macro 'as is' and assigning a button. It
didn't work. What am I doing wrong? "Tom Ogilvy" wrote: Dim ctrl as Control for each ctrl in Userform1.Controls if typeof ctrl is MSforms.OptionButton then ctrl.Value = False end if Next -- Regards, Tom Ogilvy "JaxPM" wrote: using version 2003. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had a userform with three optionbuttons. I place a commandbutton on the
sheet (commandbutton2). I then double clicked on the command button (in the vbe in design mode) and it took me to Private Sub CommandButton2_click() End sub I then altered that code to: Private Sub CommandButton2_Click() Dim ctrl As Control For Each ctrl In UserForm1.Controls If TypeOf ctrl Is MSforms.OptionButton Then ctrl.Value = False End If Next End Sub then I showed the userform and clicked one of the optionbuttons. I clicked commandbutton2 and the optionbuttons were all unselected. -- Regards, Tom Ogilvy "JaxPM" wrote: I'm a newbie. I tried pasting the macro 'as is' and assigning a button. It didn't work. What am I doing wrong? "Tom Ogilvy" wrote: Dim ctrl as Control for each ctrl in Userform1.Controls if typeof ctrl is MSforms.OptionButton then ctrl.Value = False end if Next -- Regards, Tom Ogilvy "JaxPM" wrote: using version 2003. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get this error msg:
"User-defined type not defined" "Tom Ogilvy" wrote: I had a userform with three optionbuttons. I place a commandbutton on the sheet (commandbutton2). I then double clicked on the command button (in the vbe in design mode) and it took me to Private Sub CommandButton2_click() End sub I then altered that code to: Private Sub CommandButton2_Click() Dim ctrl As Control For Each ctrl In UserForm1.Controls If TypeOf ctrl Is MSforms.OptionButton Then ctrl.Value = False End If Next End Sub then I showed the userform and clicked one of the optionbuttons. I clicked commandbutton2 and the optionbuttons were all unselected. -- Regards, Tom Ogilvy "JaxPM" wrote: I'm a newbie. I tried pasting the macro 'as is' and assigning a button. It didn't work. What am I doing wrong? "Tom Ogilvy" wrote: Dim ctrl as Control for each ctrl in Userform1.Controls if typeof ctrl is MSforms.OptionButton then ctrl.Value = False end if Next -- Regards, Tom Ogilvy "JaxPM" wrote: using version 2003. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had a userform with three optionbuttons. I place a commandbutton on the
sheet (commandbutton2). I then double clicked on the command button (in the vbe in design mode) and it took me to Private Sub CommandButton2_click() End sub I then altered that code to: Private Sub CommandButton2_Click() Dim ctrl As Control For Each ctrl In UserForm1.Controls If TypeOf ctrl Is MSforms.OptionButton Then ctrl.Value = False End If Next End Sub then I showed the userform and clicked one of the optionbuttons. I clicked commandbutton2 and the optionbuttons were all unselected. -- Regards, Tom Ogilvy "JaxPM" wrote in message ... I get this error msg: "User-defined type not defined" "Tom Ogilvy" wrote: I had a userform with three optionbuttons. I place a commandbutton on the sheet (commandbutton2). I then double clicked on the command button (in the vbe in design mode) and it took me to Private Sub CommandButton2_click() End sub I then altered that code to: Private Sub CommandButton2_Click() Dim ctrl As Control For Each ctrl In UserForm1.Controls If TypeOf ctrl Is MSforms.OptionButton Then ctrl.Value = False End If Next End Sub then I showed the userform and clicked one of the optionbuttons. I clicked commandbutton2 and the optionbuttons were all unselected. -- Regards, Tom Ogilvy "JaxPM" wrote: I'm a newbie. I tried pasting the macro 'as is' and assigning a button. It didn't work. What am I doing wrong? "Tom Ogilvy" wrote: Dim ctrl as Control for each ctrl in Userform1.Controls if typeof ctrl is MSforms.OptionButton then ctrl.Value = False end if Next -- Regards, Tom Ogilvy "JaxPM" wrote: using version 2003. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reset button code for Radio Buttons | Excel Discussion (Misc queries) | |||
how do I get radio buttons in excel | Excel Discussion (Misc queries) | |||
add radio buttons to an excel document | Excel Worksheet Functions | |||
active x radio buttons in excel | Excel Programming | |||
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True | Excel Worksheet Functions |