ActiveX Text Box with scrollbar

TheMacroMan

New Member
Joined
Jun 26, 2014
Messages
15
I have an ActiveX textbox with a vertical scrollbar. In an attempt to prevent editing, I did two things: the locked property is set to true, and the data is linked to a locked cell. The issue that I have run into is that (while the sheet is locked) I can edit one character at a time. Every time I enter something it pops up the "This sheet is protected" error, but still lets me change one character every time. Any thoughts?

As a note: setting the enabled property to false works to stop edits, but removes the ability to use the scrollbar, and the scrollbar is required.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hmm, how about rather than linking the box to a live cell, why not break the link, and load the value of the cell in to the box during form load?

Code:
sub form_load
    MyTextBox = Sheet1.Range("A1").Value
End sub

Now anything you do in the textbox has no bearing on the worksheet.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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