VBA Code that inserts cursor into a textbox

jonstw

New Member
Joined
Nov 2, 2011
Messages
14
Hi,

I am working with Excel 2007 in windows xp, I have a textbox that has been inserted in a worksheet by using insert shapes in the toolbar. I would like to run a macro that will position the cursor in the text in the textbox. The position does not matter. I have named the textbox "TextBox2".

Does anyone know of a code that will do this? or does it have to be an ActiveX control textbox?

Thank you for the help.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
That is what I was afraid of. I have about 50 textboxes in the file and I inserted them as shapes before I even learned about ActiveX controls. Therefore I was kind of hoping I did not have to re-do the file and replace the ones I already have.

I named the textboxes by just selecting the textbox and replacing the name in the bar in the left hand corner next to the function bar.
 
Upvote 0

Forum statistics

Threads
1,224,898
Messages
6,181,625
Members
453,058
Latest member
rmd0725

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top