label caption

  • Thread starter Thread starter Rod Taylor
  • Start date Start date
R

Rod Taylor

Can I add a variable to the caption of a label on a form

i.e. Label1.Caption = ("What Shift for" & CONTROLLERS_INITIALS)

where CONTROLLERS_INITIALS is a variable
 
Rod,
I would have tried it by now, if I were me, and found it to work. The
Caption property takes a string. You can assign any valid string to the
Caption property - even a concatenated one.
 
CONTROLLERS_INITIALS = "ABC"
Label1.Caption = "What Shift for " & CONTROLLERS_INITIALS

Should work.

Depending on where the code is located, you might need to qualify Label1

Userform1.Label1.Caption =

or

Sheet1.Label1.Caption =

as examples.

Regards,
Tom Ogilvy
 
Back
Top