link cells to a vb check box

jmz82

New Member
Joined
Jul 3, 2008
Messages
2
What I want to do is put in a check box that when checked cell A2 has the same thing as A1. I'm not great at vb but I tried something like this: If checkbox1 = true then a2 = a1. I'm not quite sure how to reference the cells or say the last part.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
try

If checkbox1.Value = True Then
ActiveSheet.Range("A2").Value = ActiveSheet.Range("A1").Value
End If
 
Upvote 0
That worked perfect, one more question.....How would I do a and statement. for instance if checkbox1 is checked a2 = a1 and a4 = a3. Thank you
 
Upvote 0

Forum statistics

Threads
1,215,779
Messages
6,126,846
Members
449,343
Latest member
DEWS2031

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