Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On UserForm_Initialize() I read in a value to a text box.
This following code then highlights the text in that text box. With TextBox1 ..SelStart = 0 ..SelLength = Len(.Text) ..SetFocus End With But this only works on Windows 98, but not on Windows 2000. Is there any other code that is universal and will give me the same effect in both operating systems? Garry Jones |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What happens (does not happen) on your Win 2000 system?
This works for me with Windows 2000, Excel XP: '**** Private Sub UserForm_Initialize() TextBox1.Text = "Blaha blaha" With TextBox1 ..SelStart = 0 ..SelLength = Len(.Text) ..SetFocus End With End Sub '**** Regards Anders Silvén "Garry Jones" skrev i meddelandet ... On UserForm_Initialize() I read in a value to a text box. This following code then highlights the text in that text box. With TextBox1 .SelStart = 0 .SelLength = Len(.Text) .SetFocus End With But this only works on Windows 98, but not on Windows 2000. Is there any other code that is universal and will give me the same effect in both operating systems? Garry Jones |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Anders S wrote:
What happens (does not happen) on your Win 2000 system? The text was not highlighted with my code. On a friends windows 2000, Excel 2000. I took the exact same file home on a diskette to windows 98, excel 97 and the text was highlighted. Can it matter that I am reading in the text as control source? Maybe my friend is missing a setting for colour of highlighted text? Garry Jones |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Garry
Try pressing a character key. If it works right then the old text will be replaced by your entry, colored or not. I've had no problems with code like that on any Windows platform either. -- HTH. Best wishes Harald Followup to newsgroup only please. "Garry Jones" wrote in message ... I took the exact same file home on a diskette to windows 98, excel 97 and the text was highlighted. Can it matter that I am reading in the text as control source? Maybe my friend is missing a setting for colour of highlighted text? Garry Jones |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to do a UNIX-style diff between two versions of an Excel file | Excel Discussion (Misc queries) | |||
plotting column chart whch colors the bars diff for diff comm | Charts and Charting in Excel | |||
SUMIF formula required to search for 2 diff values in 2 diff colum | Excel Worksheet Functions | |||
How do I compare two versions of the same spreadsheet to see diff. | Excel Discussion (Misc queries) | |||
Pie charts from older versions to Excel 2007 on Windows XP | Charts and Charting in Excel |