-
VBA Code for User Form
I need help with setting up user form properties. I have calendar form and when I set properties form initializes just fine showing Month and Year as a title, drop down menus for Month and Year, day names and day numbers...all in font and color I have set using properties function. However, as soon as I move doc to another PC calendar initializes without Title, drop menus for year and month and looses font, its color and background color I have previously set before moving doc to another machine. My question is, is there vba code I can set this properties when form initialized...or even maybe on Workbook Open...?
-
yes, you can. For example...
Code:
Private Sub UserForm_Initialize()
Me.TextBox1.Font.Size = [A1].Font.Size
Me.TextBox1.BackColor = [A1].Interior.Color
Me.TextBox1.ForeColor = [A1].Font.Color
End Sub