LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Conditional formatting of a Command buttton

Hello,

I want to change the font (size & color) of a command button caption based of
the value of a cell (true or false).

I was thinking maybe something like this but not sure about the syntax.

Select Case Range("R1").Value
Case Is = "True"
Reset.Font = "Red"
Reset.Font = Size 12 ???
End Select


Below is the command button code. I wasn't sure where the font change
isntructions should go. Can it go anywhere in the Sub?

Private Sub Reset_Click()
Range("R3").Value = "False"
Range("R6").Value = "False"
Range("R10").Value = "False"
Range("R14").Value = "False"
Range("R17").Value = "False"
Range("R23").Value = "False"
Range("R26").Value = "False"
Range("R28").Value = "False"
Range("R31").Value = "False"
Range("R33").Value = "False"
Range("R35").Value = "False"
Range("R41").Value = "False"
Range("R46").Value = "False"
Range("R48").Value = "False"
Range("R51").Value = "False"
Range("R55").Value = "False"
Range("R65").Value = "False"
Range("R69").Value = "False"
Range("R73").Value = "False"
Range("R77").Value = "False"
Range("R79").Value = "False"
Range("R82").Value = "False"
Range("R86").Value = "False"
Range("R93").Value = "False"
Range("R97").Value = "False"
ActiveWindow.ScrollRow = 2
Columns("G:G").Select
Selection.ClearContents
Range("F20:F21").Select
Selection.ClearContents
ActiveWindow.ScrollColumn = 1
End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200706/1

 
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
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
IF Command conditional formating IDCrewDawg Excel Worksheet Functions 7 September 8th 05 04:19 PM
Is there a command like subtotal but with a conditional? Hiughs Excel Worksheet Functions 1 March 1st 05 07:24 PM
formatting text/number in a command mnarvind[_2_] Excel Programming 0 October 14th 04 12:42 PM
formatting text/number in a command mnarvind Excel Programming 1 October 12th 04 01:10 PM


All times are GMT +1. The time now is 01:02 PM.

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"