Guinaba
Board Regular
- Joined
- Sep 19, 2018
- Messages
- 217
- Office Version
- 2016
- Platform
- Windows
Hi guys,
Not sure where what I am missing here, I am trying to use On Error GoTo to show a msg: The File is closed, please open it before running the macro, However, even when the file is opened the macro keep showing the error. I am adding the Erro GoTo righ before the error line. Is that correct?
On Error GoTo Label:
Set CurrWkWB = Workbooks("WTD Sales VS Demand Tracker_W" & CurrWk & "_" & WeekdayName(Weekday(Date), True, vbSunday) & ".XLSM")
CurrWkWB.Activate
Label:
MsgBox ("Keep both files (Current and Next Week) opened before running the Macro"), vbExclamation
Exit Sub
Not sure where what I am missing here, I am trying to use On Error GoTo to show a msg: The File is closed, please open it before running the macro, However, even when the file is opened the macro keep showing the error. I am adding the Erro GoTo righ before the error line. Is that correct?
On Error GoTo Label:
Set CurrWkWB = Workbooks("WTD Sales VS Demand Tracker_W" & CurrWk & "_" & WeekdayName(Weekday(Date), True, vbSunday) & ".XLSM")
CurrWkWB.Activate
Label:
MsgBox ("Keep both files (Current and Next Week) opened before running the Macro"), vbExclamation
Exit Sub