0

I'm using Excel 2007 to build a complex multi-tab (sheet) workbook. I'd like to save this out as PDF from within VBA. I'm trying to use ExportAsFixedFormat.

Sure enough, this call correctly exports a PDF, with the right name in the right place. However, it consists only of the currently visible tab.

I found a thread about this in Excel 2010 (which I assume is similar/same) which placed all of the sheets in an array and then selected them...

Sheet(Array("One", "Two")).Select

However, this returns an error on my machine, that the Select failed.

I'm sure this is something fairly simple, any pointers?

2

1 Answer 1

4

sigh It was something simple.

If you Export ActiveWorkbook instead of ActiveSheet... then you get all the sheets without any Array or Select.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.