Angela has attended:
Excel VBA Intro Intermediate course
Opening a new worksheet
Hi
I want to write a macro to open a new worksheet when a particular checkbox is selected. I don't want to assign the macro to the check box or a button, I also want a message box to pop up to remind the user to complete the new worksheet.
For example:
My checkbox is linked to another sheet Calculations!H15 which gives the output or True or False. I need to keep this as is as other formulas rely on this output.
what do I need to do to activate this macro to open this new worksheet?
Many thanks
RE: Opening a new worksheet
Hi Angela
Thank you for the question.
My first question is why don't you want to assign the macro to the check box?
When would you like the macro to run as it needs an event to trigger it?
Laura GB
RE: Opening a new worksheet
Hi Laura
I've tried doing that... how do I only get the macro to run when the checkbox is ticked ? It seems that the macro runs each time the checkbox is selected or deslected.
Tks
RE: Opening a new worksheet
Hi Angela
You need to put an If statement in to look at Calculations!H15.
For Example
If Sheets("Calculations").Range("H15") = True Then
'code to run when the box is ticked
Else
'code to run when the box is not ticked
End If
I hope that helps
Laura GB