hi
well i want to insert text in a text a on click of a menu from the popup menu, but its not working, if i put that code in a command button it works
n also tell me can i insert/replace text in the textbox in particular possitions.
Printable View
hi
well i want to insert text in a text a on click of a menu from the popup menu, but its not working, if i put that code in a command button it works
n also tell me can i insert/replace text in the textbox in particular possitions.
To insert/replace text in a textbox, use the string-var that holds the text, do some string-manipulations (mid$, left$ etc.) on it and set the new value for the textbox.Quote:
Originally Posted by hyousuf2
For the first problem, you have to post your code, because what you described is correct, so there must be an mistake in your code. The only problem might be the "popup menu", is that the menu from the form or something else?
To insert/replace text you have to use the .SelStart, .SelLenght and .SelText properties :)
ok the problem was from my side
but now i jus wanna ask one question when add some text in the text box programatically the cursor goes to the first possition, i want it to remain at the end
Text1.SelStart = Len(Text1.Text)
:)