Printing Excel Viewed through IE
Hopefully this is a simple issue.
I created a simple imbedded print form in a 32 tab Excel report. I had no trouble when opening it directly, however, the end result that my audience is viewing from is an internet explorer browser.
Long story short, the print form pulls up fine. When the user selects what they want to print, and click the button, an they get the following error:
Code:
Run-time error '9'
Subscript out of Range
My thought is that the code cannot "find" the excel objects to print. I tried to declare and set the excel objects, but I am at a loss at how to correctly reference it. Here is a snippet of the code that I am using (original unaltered version):
VB Code:
Private Sub cmd_PrintSelection_Click()
If Me.ck_CvrPge Then
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Cover_Page").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Cover_Page").Select
End If
If Me.ck_DHSSum Then
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("DHS_Summary").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("Cover_Page").Select
End If
....
Any suggestions are welcome...