Your mistake is here:
Dim objExcel
You need to comment that line out because the CreateObject() function will create and initialize the variable for you.
Here is a snippet of code I used to create a spreadsheet from scratch as a report output. Notice that I never declared the 'xlapp'...
To answer your question... you can use the ActiveControl property of the form to get the name of the control that has the focus.
me.ActiveControl.Name
What I would probably do, if I understand your problem correctly, is
In the LostFocus event of the textbox the first thing I would do is set...
I'm just guessing here...
If you're not running Windows 3.1 then then I think you should just upgrade to vb 4.0, if possible. Then reinstall your control libraries. I say this for a couple of reasons..
1.) VB 3.0 was built for use on a 16-bit architecture (Win 3.1). Therefore, the way the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.