I am trying to use VBA to create a procedure that sets the background Detail section of forms in white.
For ease of updating I want it to be stored in only one procedure, and for it to be called from other event procedures when the forms load.
Any idea how to implement it?
I can do this in macros, but I'm trying to gain more knowledge of VBA, so any ideas?
So far I have created this external module:
Sub AdjustColours()
Forms![SF SalesForm1].Detail.BackColor = vbWhite
End Sub
And called it by the OnLoad procedure on the SF Sales Form:
Private Sub Form_Load()
AdjustColours
End Sub
I'm trying to find out an easier coding option. Like CSS where it can be stored externally and called by a function on the body of the document.
For ease of updating I want it to be stored in only one procedure, and for it to be called from other event procedures when the forms load.
Any idea how to implement it?
I can do this in macros, but I'm trying to gain more knowledge of VBA, so any ideas?
So far I have created this external module:
Sub AdjustColours()
Forms![SF SalesForm1].Detail.BackColor = vbWhite
End Sub
And called it by the OnLoad procedure on the SF Sales Form:
Private Sub Form_Load()
AdjustColours
End Sub
I'm trying to find out an easier coding option. Like CSS where it can be stored externally and called by a function on the body of the document.
Last edited: