Working VBA code won't run in new file.

cookeetree

Board Regular
Joined
Mar 2, 2015
Messages
52
G'day Excel Gods,

I have a check box linked to a cell, with VBA code running from that. I don't know if I've gone about things "properly", but everything runs perfectly and I'm okay with that.

I created a new file, copied this code to it, and updated the cell references (the new worksheet is slightly different), yet I can't get the code to run when the check box is ticked or unticked.

Sub Determined_CheckBox()

If Range("F36") = True Then
Range("Z35") = "Enter Individiual Sample M.D.R. and Oversize Data"
Range("I36:Z43").ClearContents

End If

If Range("F36") = False Then
Range("Z35") = ""

End If

Range("I36").Select

End Sub



Any assistance you could provide would be greatly appreciated.

Cheer, Jason.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Will work only if you have "Assigned" the macro to the checkbox and added the "Cell link" in its "Format Control".
 
Upvote 1
Solution
Will work only if you have "Assigned" the macro to the checkbox and added the "Cell link" in its "Format Control".
Mate, you nailed it. I just assumed it would still be linked to that macro, but it wasn't. Works perfectly now. Thanks for your help! (y)
 
Upvote 0
Thanks for the positive feedback(y), glad we were able to help.
 
Upvote 0

Forum statistics

Threads
1,215,250
Messages
6,123,887
Members
449,130
Latest member
lolasmith

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