LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default hiding a control depending on a cell's value

The change to N40 is not triggering the change event. You can either test
N37, like so

Private Sub Worksheet_Change(ByVal Target As Range)

With Target
If .Address = "$N$37" Then
If .Value = "monthly" Then
Me.OLEObjects("CommandButton1").Enabled = True
Else
Me.OLEObjects("CommandButton1").Enabled = False
End If
End If
End With

End Sub

or add more complex calculate event code.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"yoram" wrote in message
oups.com...
ok, cell N37 is data validated with the 'list' condition. the list has
three three text options,"weekly","monthly","yearly". N40 has this
formula: if(N37="monthly",1,"0"). so if "monthly" is the option the
user chooses, i want the command button to be enabled and disabled at
all other times. btw N37 is a merge of three cells for formatting
purposes...i doubt that would make any difference though.



 
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
Selecting a cell depending on the other cell's value, kind of wally_91[_4_] Links and Linking in Excel 2 April 2nd 08 05:12 PM
How can I change a picture depending on a cell's contents LEP Excel Discussion (Misc queries) 1 December 23rd 07 12:16 AM
CONDITIONAL RESULTS DEPENDING ON CELL'S NAME (sumproduct) HERNAN Excel Discussion (Misc queries) 4 September 5th 06 09:02 PM
How do I get a cell to flash depending on another cell's value? trrrr Excel Worksheet Functions 3 May 8th 06 06:41 PM
autowrite a cell depending on another cell's content jose carreno Excel Programming 2 October 1st 03 05:50 PM


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