can I adopt this persentage code to use H1 as referance value?
Jack, Try this for size......
Sub blue()
ActiveCell.FormulaR1C1 = _
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIII"
With ActiveCell.Characters(1, Sheets("Sheet1").Range("H1").Value).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.ColorIndex = 5
End With
End Sub
Sub normal()
ActiveCell.FormulaR1C1 = _
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIII"
With ActiveCell.Characters(Sheets("Sheet1").Range("H1") .Value + 1, 100).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 10
.ColorIndex = 1
End With
End Sub
--
Cheers
Nigel
"J_J" wrote in message
...
Hi,
The below code displays a percentage like bar on the screen
regarding to the numerical values in the sub's. I need to use a
variable for this (preferably taking the cell H1 value on Sheet1).
Is this possible?
'==========================
Sub blue()
ActiveCell.FormulaR1C1 = _
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIII"
With ActiveCell.Characters(Start:=1, Length:=20).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 5
End With
End Sub
Sub normal()
ActiveCell.FormulaR1C1 = _
"IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII IIIIIIIIIIIIIIIIIIIIIIIIII
IIIIIIIIIIIIIIIIIIIIIIIII"
With ActiveCell.Characters(Start:=21, Length:=90).Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 1
End With
End Sub
'-----------------------------------------------
Private Sub CommandButton1_Click()
blue
normal
End Sub
'=======================
TIA
J_J
|