uktous
06-24-2012, 06:29 AM
Hi,
The macro “run_A_to_C" contains 3 macros – A, B, and C.
I hope that macro A can perform this function:
If sheets(“sheet1”) doesn’t exist, then stop running macro run A_to_C.
Note: not just stop running macro A.
Sub run_A_to_C ()
A
B
C
End sub
the following macro A can exit macro A only, but can't exit macro "run A_to_C".
Sub A()
On Error Resume Next
Set wks = Worksheets("Sheet1")
On Error Goto 0
If wks Is Nothing Then
Exit sub
End If
End Sub
Thanks
The macro “run_A_to_C" contains 3 macros – A, B, and C.
I hope that macro A can perform this function:
If sheets(“sheet1”) doesn’t exist, then stop running macro run A_to_C.
Note: not just stop running macro A.
Sub run_A_to_C ()
A
B
C
End sub
the following macro A can exit macro A only, but can't exit macro "run A_to_C".
Sub A()
On Error Resume Next
Set wks = Worksheets("Sheet1")
On Error Goto 0
If wks Is Nothing Then
Exit sub
End If
End Sub
Thanks