-
I'm trying to write a rip-off of that old game with the monkeys and the exploding bananas. After each guess, I clear the text boxes for velocity and angle and want to put the cursor back into the angle text box. I'm using the setfocus API but when I put it's declaration in a module (yes, I delcare it as public) and then go to call it in my command button's click event, it isn't recognized. By recognized I mean it doesn't put up the tool tip with the argument list. And it gets an error when I try to call it.
So I decided to declare it as private in my form's declarations, and I get an error about that object already existing in the object module it resides in, or something like that. :mad: The tool tip does come up when I call the function though.
Any ideas what's going on? Also, if there is an easier way to put the cursor in the text box, could someone notify me?
-
Never mind...
I figured it out. The error about already existing clued me in. Turns out I was being dense and a textbox already has a setfocus method (or event, whatever). So it couldn't recognize another one. Boy, I feel silly. :rolleyes: