Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi -
I am trying to change the formatting of a group of cells with a toggle button, but the cells to not format to accounting when the toggle button is clicked. Is there something I can add to this? Here is what I have so far - Cells M62:AJ64 are the cells that I would like to have the formatting changed. Cell CC60 is the linked cell of the toggle button that changes from TRUE to FALSE. I can't seem to get the formatting to change when the value is TRUE. Range("M62:AJ64").Select With Selection If .Cells(cc60) = False Then Selection.NumberFormat = "0.00%" Else Selection.NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)" End If End With Thanks. STephen |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Stephen,
Cell CC60 is not within your selection so you don't need the full stop before it. Also, it's the Value of the toggle button that you need. Try If Cells(CC60).Value = False Then HTH Henry "Stephen" wrote in message om... Hi - I am trying to change the formatting of a group of cells with a toggle button, but the cells to not format to accounting when the toggle button is clicked. Is there something I can add to this? Here is what I have so far - Cells M62:AJ64 are the cells that I would like to have the formatting changed. Cell CC60 is the linked cell of the toggle button that changes from TRUE to FALSE. I can't seem to get the formatting to change when the value is TRUE. Range("M62:AJ64").Select With Selection If .Cells(cc60) = False Then Selection.NumberFormat = "0.00%" Else Selection.NumberFormat = "_($* #,##0.00_);_($* (#,##0.00);_($* ""-""??_);_(@_)" End If End With Thanks. STephen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Toggle Button | Excel Worksheet Functions | |||
Need to Use 1 Button to toggle On or Off | Excel Discussion (Misc queries) | |||
Toggle button | Excel Discussion (Misc queries) | |||
Toggle Button | Excel Discussion (Misc queries) | |||
Toggle Button | Excel Programming |