SeFocus causing Run time error
- by code8230
I am getting:
Run-time error '5':
Invalid procedure call or argument
this seems to happen when Text(1).SetFocus is called.
However, I dont see this run time error for all the cases where I have used SetFocus. Just 2-3 places it is causing this error.
Text(1).SelStart = 3
Text(1).SelLength = 1
Text(1).SetFocus
I tried:
Text(1).Enabled = True
Text(1).Visible = True
just above .SelStart, but it didn't fix the issue.