SetFocus - 10/17/03 04:06 PM
hey all,
my first VB assignment at uni works fine except for one thing. When the program starts it runs until it gets to SetFocus and then gives me a Run time error '5' an invalid procedure call or argument.
when it starts it reads the Form_Load code and skips to the optBackColour1_Click sub be qives me the error when it gets to txtStyles.SetFocus
any help will be appreciated.....
my first VB assignment at uni works fine except for one thing. When the program starts it runs until it gets to SetFocus and then gives me a Run time error '5' an invalid procedure call or argument.
Code
Private Sub Form_Load() optBackColour1.Value = True optTextColour1.Value = True optFont1.Value = True optPointSize1.Value = True txtStyles.SetFocus End Sub Private Sub optBackColour1_Click() txtStyles.BackColor = &HFFFFFF txtStyles.SetFocus End Sub
any help will be appreciated.....