Posted to microsoft.public.excel.programming
|
|
Setting font properties using function
OK thanks, I see now.
"joel" wrote in message
...
Here is another method closer to what you did.
Type MyFont
Color As Long
Bold As Boolean
End Type
Sub test()
Dim Mycell As MyFont
Set xlSht = ActiveSheet
Mycell = NameFormatType1(255)
xlSht.Cells(1, 1).Font.Color = Mycell.Color
xlSht.Cells(1, 1).Font.bold = Mycell.bold
End Sub
Private Function NameFormatType1(NmCol As Long) As MyFont
NameFormatType1.Color = RGB(NmCol, 0, 0)
NameFormatType1.bold = True
End Function
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=166121
Microsoft Office Help
|