I have a form with a picturebox on the top that I am going to use as a "page header". The page header is going to be on multiple forms so would like to set its properties in one place instead of multiple places.
In the form load of the form, I have:
VB Code:
Private Sub Form_Load()
PageDesign
End Sub
The picturebox is called picPageHeader. Now in the module, I have:
VB Code:
Public Sub PageDesign(picPageHeader As PictureBox)
With picPageHeader
.BackColor = RGB(187, 187, 187)
End With
End Sub
but when I bring up the form, I am given the following error message:
When I click OK, I am then taken to the form load event of the form itself. What am doing wrong? Please advise and thanks in advance.