First let me correct two mistakes I made writing this macro:
Change
to
because you have to set action to take before error is found and the correct way to write this statement is "On Error GoTo". This error trapping is for xlsx files that have no "Dashboard" sheet, they should be ignored and when this error occurce macro should jump down to line "skipper:"
But if you excamine the macro you will see first the file is opened, then sheets("Dashbord") should be activated, if there is no "Dashboard" this trows an error and macro jumps dovn to line "skipper:" but the way it's written the "skipper:" line is placed after the "file close command" so this means the file will stay open untill you manually close it.
Therfore change
to
in some cases the partial graph / table is getting captured in one PDF, and the remaining in the next page.
I'll have a go at it but it would be easier for me if you could upload one of the xlsx files that spreads ower two pdf pages so I could play around with it.
Alf
Bookmarks