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: 586
Default Make Enable Property = OptionButton.Value for all Controls in Fram

I have an optionbutton in a frame along with a variety of controls. I would
like to enable = True when the Option Button = True and visa versa. The code
below works, but only for TextBoxes. Can this code work for all controls?

Private Sub OptionButton13_Click()

Dim ctrl As Control

For Each ctrl In Me.Frame2.controls
If TypeOf ctrl Is MsForms.TextBox Then
ctrl.Enabled = OptionButton13.Value
End If
Next

End Sub

Thanks,
Ryan
 
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
Error saying Control object does not have Enable property. MikeAllgood Excel Programming 2 March 11th 08 12:24 AM
MultiPage: How to enable controls in Frame on Page Tetsuya Oguma Excel Programming 0 November 6th 06 02:51 AM
ddm enable/disable: Object doesn't support this property, my a** it doesn't William DeLeo Excel Discussion (Misc queries) 3 June 14th 06 06:57 PM
How get a row number of the controls(sample:optionbutton) cyberarmao Excel Programming 2 June 5th 06 08:43 AM
Enable and disable worksheet controls? William Deleo Excel Programming 8 December 23rd 03 12:59 PM


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

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"