Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Grayed out or disable?

Is there a way to gray out or disable OptionButtons or CheckBoxes in a user
form if a condition is met, either on the spreadsheet (preferred if possible,
since I have conditions set up there already) or prior user form selections?
If so, how would you go about setting that up? Thanks for any help on this
in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Grayed out or disable?

If condition Then
Checkbox1.Enabled = False
End If

RBS


"Cerberus" wrote in message
...
Is there a way to gray out or disable OptionButtons or CheckBoxes in a
user
form if a condition is met, either on the spreadsheet (preferred if
possible,
since I have conditions set up there already) or prior user form
selections?
If so, how would you go about setting that up? Thanks for any help on
this
in advance.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Grayed out or disable?

Thank you for your quick response. A stupid question from a new VBA user;
when you say "If condition Then", would I put something like

If Range("B2").Value = "N/A" Then

Or am I way off? Sorry for asking such basic stuff, I'll get it soon I hope.

"RB Smissaert" wrote:

If condition Then
Checkbox1.Enabled = False
End If

RBS


"Cerberus" wrote in message
...
Is there a way to gray out or disable OptionButtons or CheckBoxes in a
user
form if a condition is met, either on the spreadsheet (preferred if
possible,
since I have conditions set up there already) or prior user form
selections?
If so, how would you go about setting that up? Thanks for any help on
this
in advance.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Grayed out or disable?

Maybe, if B2 actually contained that #N/A error...

if activesheet.range("B2").text = "#N/A" then
or
if iserror(activesheet.range("b2").value) then

But if you really have the text N/A, try your original guess.



Cerberus wrote:

Thank you for your quick response. A stupid question from a new VBA user;
when you say "If condition Then", would I put something like

If Range("B2").Value = "N/A" Then

Or am I way off? Sorry for asking such basic stuff, I'll get it soon I hope.

"RB Smissaert" wrote:

If condition Then
Checkbox1.Enabled = False
End If

RBS


"Cerberus" wrote in message
...
Is there a way to gray out or disable OptionButtons or CheckBoxes in a
user
form if a condition is met, either on the spreadsheet (preferred if
possible,
since I have conditions set up there already) or prior user form
selections?
If so, how would you go about setting that up? Thanks for any help on
this
in advance.




--

Dave Peterson
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
commands have been grayed out Greg Z Excel Programming 1 December 6th 07 10:20 AM
DELETE IS GRAYED OUT ibeetb Setting up and Configuration of Excel 1 June 21st 06 09:43 PM
Autofilter grayed out - why? Jeff Weinberg Excel Worksheet Functions 2 April 8th 06 03:10 AM
grayed out simmo2004 Excel Discussion (Misc queries) 1 January 18th 05 05:25 PM
chart grayed out Elshpen Charts and Charting in Excel 4 January 12th 05 04:13 PM


All times are GMT +1. The time now is 06:25 PM.

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"