View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Trying to toggle visability of button

If 'salestax' is a named range, you need to use code like

Select Case Range("salestax").Value


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




"Jim at Eagle" wrote in
message
...
salestax is a named cell
value is generated by if() and vlookup.
part of if() references cell D9 (unprotected override value for
salestax)
Trying to toggle visability of button based on change of cell
D9 or change
in salestax
Thanks

"Chip Pearson" wrote:

Where are you getting the value of the 'salestax' variable?
Also,
it is bad programming practice to change the cell to which the
Target variable points.


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


"Jim at Eagle" wrote in
message
...
Trying to toggle visability of button based on value of
named
range.
Private Sub Worksheet_SheetChange(ByVal Target As Range)
Target = sheet1.Range("d9")
ToggleButton1.Visible = True
Select Case salestax
Case 0.00001 To 100
ToggleButton1.Visible = True
Case Else
ToggleButton1.Visible = False
End Select
End Sub
Help Please
--
Jim at Eagle