CMIIandExcel
Board Regular
- Joined
- Sep 4, 2009
- Messages
- 190
Hi all
I am having some issues in passing Hex numbers to a function:
the call which is showing a syntax error is this
the function itself is this:
I have tried a number of varible types for the 'Back and Fore Colour varibles, if i work with the hex numbers as strings the code complies but falls over at run time.
I know i could replace the hex number with the RGB function, but i would like to get my head around working with hex numbers
and thoughts and advice?
Regards
Mike
I am having some issues in passing Hex numbers to a function:
the call which is showing a syntax error is this
Code:
SetLabel FormControls.lblHeader, 2, iBarSidePad, (iFormHeaderHight - 2), iBarWidth, _
"Header", &H999999, &HO00000
Code:
Private Function SetLabel(ByVal lblLabel As Control, ByVal iTop As Long, ByVal iLeft As Long, ByVal iHeight As Long, ByVal iWidth As Long, _
strText As String, ByVal BackColour As Byte, ByVal ForeColour As Byte)
With lblLabel
.top = iTop
.left = iLeft
.Height = iHeight
.Width = iWidth
.Caption = strText
.BackColor = BackColour
.ForeColor = ForeColour
End With
End Function
I know i could replace the hex number with the RGB function, but i would like to get my head around working with hex numbers
and thoughts and advice?
Regards
Mike