I'm trying to pass an array of sheet names through the printout method, but keep receiving a fatal error that crashes excel. I have verified that each sheet exist in the active workbook. Additionally, if I replace the variable PrintArray with the values ("GG","N3","Z.2"), the code will run.
Any thoughts are greatly appreciated.
Error Message:
"Automation error
Exception occurred."
Line where code errors:
Sheets(Array(PrintArray).PrintOut
Array Values when code errors:
PrintArray(0) = "GG"
PrintArray(1) = "N3"
PrintArray(2) = "Z.2"
Any thoughts are greatly appreciated.
Error Message:
"Automation error
Exception occurred."
Line where code errors:
Sheets(Array(PrintArray).PrintOut
Array Values when code errors:
PrintArray(0) = "GG"
PrintArray(1) = "N3"
PrintArray(2) = "Z.2"