I am writing a program in VB2005 which opens an existing Excel file, updates the worksheets, and prints some of the sheets. I have two problems. First, I can call Excels print command with a specific printer, but I would like to be able to open Excels print dialog so other users can choose an appropriate printer. I have tried VB's printdialog, and I can select a printer, but I can't get the string with the printer name to pass to Excel's print command.
Second, I can select multiple sheets from Excel VBA with
However, in VB2005, I get the error that Array is a type. How can I select multiple sheets to print?
Any help would be greatly appreciated.
Second, I can select multiple sheets from Excel VBA with
VB.NET:
Sheets(Array("Sheet1", "Sheet2")).Select
Any help would be greatly appreciated.