![]() |
|
|
Thread Tools | Display Modes |
#10
|
||||
|
||||
![]()
The font colour can also be changed by adding this line
Code:
Sub SetLabels(sLabel As String, aSheet As Worksheet) Dim aCtl As Control, lngColour As Long, aShape As Shape Select Case sLabel Case "Warning": lngColour = RGB(120, 0, 0) Case "Caution": lngColour = RGB(0, 120, 0) Case Else: lngColour = RGB(0, 0, 120) End Select For Each aShape In aSheet.Shapes If aShape.Title = "Label" Then aShape.TextFrame2.TextRange.Text = sLabel aShape.Line.ForeColor.RGB = lngColour aShape.TextFrame2.TextRange.Font.Fill.ForeColor.RGB = lngColour End If Next aShape End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trying to link a cell from one worksheet to another | gambo | Excel | 1 | 01-18-2019 10:26 AM |
![]() |
jrooney7 | Word VBA | 14 | 09-16-2018 08:52 PM |
Userform calls other userform, then populate worksheet | Lehoi | Excel Programming | 0 | 02-03-2016 02:58 PM |
link worksheet on shared file | hifrank | Word | 0 | 06-24-2015 07:29 AM |
![]() |
mars1886 | Excel Programming | 3 | 02-11-2014 02:12 PM |