I've got a form which exists to get a small amount of input from a user - very much like the "InputBox" function. It's called like this
The AskUser() function does a bit of setting up, fills the input text box with the default if it's supplied and that all works. It then displays the form Modally so that the user has to respond before it carries on. However, when I've filled the default in I want that to be the control that initially has focus - how do I do that??? I've triedCode:Dim sAnswer As String sAnswer = dlgInput.AskUser(Caption [,Default])
but I get an error, presumably because the form isn't yet shown at this point.Code:txtInput.SetFocus
Any ideas how I get the textbox to have focus, or can't I because of the nature of a modal form?
TIA,
Toot




Reply With Quote