Is this possible with VBA?

dfenton21

Board Regular
Joined
Jun 23, 2007
Messages
135
Hi All,

I am new to VBA and not sure of its limitations. I would appreciate your assistance with this. I have a worksheet with three columns (say A1:A20, B1:B20, C1:C20) The cells in column A are protected so the user can’t select them. There are two things I would like to do:

1) I would like the user to be able to select a cell in column A, click a command button, and the contents will be cut from that cell and pasted to column B. I can do that with a macro, but the problem is that the cells are protected (which is vital). It is possible to assign an option button to a cell, e.g. the user clicks the option button beside a cell, clicks a command button, and the contents of that cell are copied. If not possible, can you suggest an alternative?

2) When the user clicks the command button to do the copy and paste, is at also possible for excel to display a message box which contains a text box. The user can type an entry into that next box, and when the user clicks OK, the contents of that text box is inserted into column C.

Thanks for your help,

Damien
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
1) How about having the button work on any cell selected within that rfow and then just get the value in column A?

2) you could use a userform or a simple InputBox (see help).
 
Upvote 0

Forum statistics

Threads
1,214,432
Messages
6,119,468
Members
448,900
Latest member
Fairooza

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