![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 20
|
The code below makes specific text in a range of cells turn red once my checkbox is checked, what do I add to this to make it also underline the text in these cells?
P.S. - need a good free website for learning the basic's vb . Doing alot of spreadsheet development using control toolbox functions. Private Sub CheckBox1_Click() If Me.CheckBox1.Value = True Then Me.Range("B14:D14").Font.Color = vbRed Else Me.Range("B14:D14").Font.Color = vbBlack End If End Sub |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
Font.Underline = xlUnderlineStyleSingle
__________________
~Anne Troy |
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Apr 2002
Location: Arizona
Posts: 68
|
Just out of curiosity...what is the purpose of the "me" in "me.checkbox1..." I've seen this in several userform examples, but have never had to use it when I create and write code for userforms. Thanks in advance for any replies!
Quote:
|
|
|
|
|
|
|
#4 |
|
New Member
Join Date: May 2002
Posts: 20
|
I'm not sure what the 'me' does in the code, I picked it up from someone else however when I took it out, it didn't effect it one bit. I guess it isn't necessary.
Thanks for helping me clean it up. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|