![]() |
Windows versions diff
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 |
Windows versions diff
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 |
Windows versions diff
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 |
Windows versions diff
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 |
All times are GMT +1. The time now is 12:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com