Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Dim Userform Control

Is there an easy bit of code for dimming a UserForm Control when not in use?
--
donwb
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Dim Userform Control

I'm not sure what you're after, perhaps more detail would be
helpful. But you can declare a variable of a control's type with
code like

Dim MyComboBox As MSForms.ComboBox
Set MyComboBox = UserForm1.ComboBox1


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"donbowyer" wrote in
message
...
Is there an easy bit of code for dimming a UserForm Control
when not in use?
--
donwb



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Dim Userform Control

You are probably looking for the enabled property.

CommandButton1.Enabled = False
--
HTH...

Jim Thomlinson


"donbowyer" wrote:

Is there an easy bit of code for dimming a UserForm Control when not in use?
--
donwb

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Dim Userform Control

Your answer is probably what the user wanted. I took "dimming" to
mean using a Dim statement, not the more obvious "making
something dim". My mistake.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Jim Thomlinson" wrote in message
...
You are probably looking for the enabled property.

CommandButton1.Enabled = False
--
HTH...

Jim Thomlinson


"donbowyer" wrote:

Is there an easy bit of code for dimming a UserForm Control
when not in use?
--
donwb



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Dim Userform Control

There is a problem with UserForm SpinButtons in that they can be disabled
like that but they won't look disabled.

Will have to do as well:
ForeColor = vbButtonShadow

RBS


"Jim Thomlinson" wrote in message
...
You are probably looking for the enabled property.

CommandButton1.Enabled = False
--
HTH...

Jim Thomlinson


"donbowyer" wrote:

Is there an easy bit of code for dimming a UserForm Control when not in
use?
--
donwb




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Dim Userform Control

I'm not now sure I can do what I thought I could do ie dimming (less bright)
a TextBox. But one of your suggestions - set it to active=false will do fine.
Thanks everyone
--
donwb


"donbowyer" wrote:

Is there an easy bit of code for dimming a UserForm Control when not in use?
--
donwb

Reply
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
Control Sequence from Userform Control Nigel Excel Programming 3 December 29th 04 01:25 PM
Userform control ZMore Excel Programming 1 March 5th 04 11:34 PM
Userform control Phillips Excel Programming 1 November 20th 03 07:33 PM
UserForm Control John Wilson Excel Programming 0 July 16th 03 06:53 PM
UserForm Control Richard Choate Excel Programming 0 July 16th 03 06:50 PM


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

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

About Us

"It's about Microsoft Excel"