-
Clearing contents of textbox which has the focus -(VBA EXCEL)
Could anyone tell me how I would determine which text box currently has the
focus, so that I can clear its contents when a commmand button is clicked?
Thanks a bunch,
Allison
-
Re: Clearing contents of textbox which has the focus -(VBA EXCEL)
Allison,
As soon as you click the button, the textbox will have lost the focus.
I would create a string variable. Each time any textbox loses focus, set
the string variable to the name of the textbox losing focus. In other words,
you will need to code every textbox's lostfocus event... When you click
the button, clear the contents of the textbox saved in the string variable.
Craig Brown
"Allison" <amilborrow@expressvu.com> wrote:
>
>Could anyone tell me how I would determine which text box currently has
the
>focus, so that I can clear its contents when a commmand button is clicked?
>
>Thanks a bunch,
>Allison
-
Re: Clearing contents of textbox which has the focus -(VBA EXCEL)
Thank you for your help I just realized the error in my logic as well! Thank
you for pointing that out to me.
"Craig Brown" <cbrown.consulting@snet.net> wrote:
>
>Allison,
>
>As soon as you click the button, the textbox will have lost the focus.
>
>I would create a string variable. Each time any textbox loses focus, set
>the string variable to the name of the textbox losing focus. In other words,
>you will need to code every textbox's lostfocus event... When you click
>the button, clear the contents of the textbox saved in the string variable.
>
>Craig Brown
>
>"Allison" <amilborrow@expressvu.com> wrote:
>>
>>Could anyone tell me how I would determine which text box currently has
>the
>>focus, so that I can clear its contents when a commmand button is clicked?
>>
>>Thanks a bunch,
>>Allison
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks