Hi, I am having some trouble with what should simple VBA code that is producing an error and locking up Excel when I run the macro to where I have to go to my Task Manager to force-close Excel.
I am trying to have the macro select the 'Cover' tab in my workbook, then open the Print Dialog Box. It does this but when I click Print, it returns the error messages shown below. Does anyone know how to fix this or write the VBA code in a different way to produce the result I want without errors?
My VBA Code for the Macro:
Sub Print_Cover()
'
Sheets("Cover").Select
Application.Dialogs(xlDialogPrint).Show
End Sub
I run the Macro and get the print dialog box like I want:
I hit OK ,and I get this error message:
After I hit OK on this error message I get this error message from the Anaplan add-in I have to use that creates a live connection to our data in Anaplan. (Could have something do with it, but the macro worked perfectly before their latest update)
Screenshot of VBA Code:
I am trying to have the macro select the 'Cover' tab in my workbook, then open the Print Dialog Box. It does this but when I click Print, it returns the error messages shown below. Does anyone know how to fix this or write the VBA code in a different way to produce the result I want without errors?
My VBA Code for the Macro:
Sub Print_Cover()
'
Sheets("Cover").Select
Application.Dialogs(xlDialogPrint).Show
End Sub
I run the Macro and get the print dialog box like I want:
I hit OK ,and I get this error message:
After I hit OK on this error message I get this error message from the Anaplan add-in I have to use that creates a live connection to our data in Anaplan. (Could have something do with it, but the macro worked perfectly before their latest update)
Screenshot of VBA Code: