![]() |
formatting macro with a toggle button
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 |
formatting macro with a toggle button
|
formatting macro with a toggle button
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 |
All times are GMT +1. The time now is 12:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com