Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm working with a this code below that works great!
It first checks on sheet1 cell D3 to first see if there is a value before it provides a date stamp.
Here is the code:
Now my question is, when I change this code to execute it for another sheet, for example sheet10 in the code below it does not work and I can't figure it out.
If I type a date into sheet10 cell B2, I'd expect the MsgBox to popup
Can someone try and help me out on this?
Thanks,
Pin
I'm working with a this code below that works great!
It first checks on sheet1 cell D3 to first see if there is a value before it provides a date stamp.
Here is the code:
Code:
Sub Macro16()
'
' Macro16 Macro
'
'
Application.Cursor = xlWait 'during processing
If Not IsEmpty(Sheet1.Range("D3").Value) Then
MsgBox ("This was already executed! Please use the SAVE ICON at the TOP LEFT TO SAVE YOUR DOCUMENT!")
Application.Cursor = xlDefault 'on completion / error
Exit Sub
End If
Call UNLockCell
Call AddDateStamp
Call SaveAsXLSM
Application.Cursor = xlDefault 'on completion / error
End Sub
Now my question is, when I change this code to execute it for another sheet, for example sheet10 in the code below it does not work and I can't figure it out.
Code:
Sub Macro33()
'
' Macro33 Macro
'
'
If IsEmpty(Sheet10.Range("B2").Value) Then
MsgBox ("The IMPORT HAS to be executed FIRST!!")
Exit Sub
End If
Application.Cursor = xlDefault 'on completion / error
End Sub
If I type a date into sheet10 cell B2, I'd expect the MsgBox to popup
in using Macro33 above, but it does not (?).The IMPORT HAS to be executed FIRST!!
Can someone try and help me out on this?
Thanks,
Pin