cursor selected range from a text box

  • Thread starter Thread starter Pal
  • Start date Start date
P

Pal

How can I set the cursor selected range, from a text box, as input?

I am using the following but it only returns the ENTIRE text from the box,
not
my cursor selected range in the Text Box.

tmpText$ = TextBox1.Text
MsgBox tmpText$
 
Thanks!

I also want the value of textbox1.SelText to be updated live so it could be
used with custom functions
as I adjust the selected range.
I created a function to show the selected string from the text box but it
did not work.


Function selected(tmptext As String)
tmptext = TextBox1.SelText
selected = tmptext
End Function

In cell a23 I put:
+selected

But it did not work.

Thanks
Pal
 
Back
Top