dparteka
Member
I think I’m real close here but there is a problem I haven’t been able to figure out. What should happen is when I check the checkbox the macro should look in A1, if nothing is there it should simply shutdown and change none of the checkbox properties. When a date is entered in A1 and the checkbox is clicked it should run the full macro.
If I run only the top portion of the macro it works fine and if I run only the bottom portion of the macro it also works fine… when I run them together it shuts down with an error.
File is attached... any help would be greatly appreciated… thanks Dennis
If I run only the top portion of the macro it works fine and if I run only the bottom portion of the macro it also works fine… when I run them together it shuts down with an error.
File is attached... any help would be greatly appreciated… thanks Dennis
Code:
Private Sub CheckBox2_Click()
On Error GoTo EXITSUB:
Me.CheckBox2.Value = IIf(Range("A1").Value = "", False, True)
EXITSUB:
Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile ("H:\Public\PCB-QCR's\" & Range("A2").Text & " QCR.lnk")
ActiveSheet.Shapes("CheckBox2").Select
CheckBox2.Enabled = False
End Sub