Dynamically Linking ActiveX Command Buttons

MrChuck

New Member
Joined
Aug 6, 2008
Messages
6
I am currently working on a project where I have a collection of textboxes which are storing various entries of text. Next to those textboxes I am trying to add some buttons, that when clicked, call a userform that is used to add a new entry to the respective text box (the boxes being otherwise read only). For this to work each button needs to return its respective cell address to the user form. I have everything working nicely for the textboxes (through the use of its 'LinkedCell' parameter) but the command buttons have no such link. Even this would not be a problem except that my spreadsheet needs to allow for the insertion of new rows and columns. This means that a static routine for each button will not work because I can't find a way to make it update with a shifting spreadsheet.

So anyway, here is my question. Is there a way to dynamically link a command button to a cell or activeX textbox. Could I just trick my textbox into acting as a button (as long as scrolling still works)? Can I create a custom acitiveX controll? Any information on this matter would be a great help. Thanks for your time.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Have a look at the TopLeftCell property which returns a range object of the cell of the top left corner of an object.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,196
Members
449,072
Latest member
DW Draft

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