Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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



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
How to do a UNIX-style diff between two versions of an Excel file Kilongen Excel Discussion (Misc queries) 3 August 10th 09 05:31 PM
plotting column chart whch colors the bars diff for diff comm Cathy Charts and Charting in Excel 5 March 19th 09 06:30 PM
SUMIF formula required to search for 2 diff values in 2 diff colum Lidy693 Excel Worksheet Functions 7 February 21st 09 09:45 PM
How do I compare two versions of the same spreadsheet to see diff. John C. Excel Discussion (Misc queries) 1 February 18th 09 06:54 PM
Pie charts from older versions to Excel 2007 on Windows XP Ted Sylvio Charts and Charting in Excel 3 January 15th 08 08:37 AM


All times are GMT +1. The time now is 08:11 AM.

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

About Us

"It's about Microsoft Excel"