View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Add a label at runtime

If by form, you mean a userform:

Private Sub UserForm_Initialize()
Dim LBL As MSForms.Label
Set LBL = Controls.Add("Forms.Label.1", "Lable2", True)
LBL.Top = 5
LBL.Left = 5
LBL.Caption = "abcd"

End Sub

--
Regards,
Tom Ogilvy

"Ron" wrote in message
...
Hi,

Can anyone tell me how I can add a label to a form at runtime.


Regards,
Ron.