#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Set Focus

Hi,
I use set focus on a user form to move the cursor to text boxes after
certain events. What I want is instead of a cursor is to have the text box
"highlighted" so that I don't have to delete the existing value before
typing in a new value. I'm not sure what to call this format or if there is
a method/property for it in VB . It's like when you drag the cursor over
text and the background goes black ready for editing - this is the state I
want my textbox to be in after an event. How do I do this?

Regards
gregork


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Set Focus

With TextBox1
.SelStart = 0
.SelLength = Len(.Text)
End With

--

Vasant

"gregork" wrote in message
...
Hi,
I use set focus on a user form to move the cursor to text boxes after
certain events. What I want is instead of a cursor is to have the text box
"highlighted" so that I don't have to delete the existing value before
typing in a new value. I'm not sure what to call this format or if there

is
a method/property for it in VB . It's like when you drag the cursor over
text and the background goes black ready for editing - this is the state I
want my textbox to be in after an event. How do I do this?

Regards
gregork




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Set Focus

Thanks Vasant that was exactly what I was looking for.

Regards
gregork

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
With TextBox1
.SelStart = 0
.SelLength = Len(.Text)
End With

--

Vasant

"gregork" wrote in message
...
Hi,
I use set focus on a user form to move the cursor to text boxes after
certain events. What I want is instead of a cursor is to have the text

box
"highlighted" so that I don't have to delete the existing value before
typing in a new value. I'm not sure what to call this format or if there

is
a method/property for it in VB . It's like when you drag the cursor over
text and the background goes black ready for editing - this is the state

I
want my textbox to be in after an event. How do I do this?

Regards
gregork






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
focus Capp Excel Discussion (Misc queries) 2 November 18th 05 07:25 PM
set focus tkaplan Excel Discussion (Misc queries) 3 September 27th 05 07:41 PM
Focus David Unger Excel Worksheet Functions 20 March 21st 05 06:43 PM
How do I set focus Newbie Excel Programming 2 February 11th 04 07:03 PM
set focus RickK Excel Programming 1 October 10th 03 12:27 PM


All times are GMT +1. The time now is 02:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"