Hi all, i am trying to add a simple label to my form at run-time, i am experimenting with some code and i am wondering whether this is correct as it is not working...
(VB6)
VB Code:
  1. Private Sub Command1_Click()
  2. Me.Controls.Add "VB.Label", "Label1"
  3. Me!Label1.Caption = "New Label Created At runtime"
  4. Me!Label1.Visible = True
  5. Me!Label1.Left = 100
  6. Me!Label1.Top = 100
  7. Me!Label1.Height = 25
  8. Me!Label1.Width = 150
  9. End Sub

Where am i going wrong ?