LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Userform Controls

I'm not sure of exactly which controls you want to disable, so you
will have to adjust the logical test in the If statement, but this
should give you the idea (paste this code within the click event of a
button or trigger it as you want):

Private Sub CommandButton1_Click()
Dim c As Control
For Each c In Me.Controls
If c.Name = "Cntrl1" Then
c.Enabled = False
End If
Next
End Sub

Good luck,
Randy

 
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
userform controls natanz[_2_] Excel Programming 3 November 2nd 05 02:38 PM
Userform Controls Nigel Excel Programming 5 December 30th 04 01:49 PM
Help please with UserForm controls sa3214 Excel Programming 4 July 2nd 04 03:00 AM
Add controls to UserForm Vyyk Drago Excel Programming 3 August 26th 03 01:22 PM
What order does VBA look at userform controls? Brad Patterson Excel Programming 3 July 17th 03 03:46 AM


All times are GMT +1. The time now is 05: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"