Results 1 to 3 of 3

Thread: Printing Excel Viewed through IE

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    5

    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:
    1. Private Sub cmd_PrintSelection_Click()
    2.    
    3.     If Me.ck_CvrPge Then
    4.         ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
    5.         Sheets("Cover_Page").Select
    6.         ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    7.         Sheets("Cover_Page").Select
    8.     End If
    9.    
    10.     If Me.ck_DHSSum Then
    11.         ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
    12.         Sheets("DHS_Summary").Select
    13.         ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    14.         Sheets("Cover_Page").Select
    15.     End If
    16.  
    17. ....

    Any suggestions are welcome...
    Last edited by draybu; Aug 20th, 2003 at 11:38 AM.

  2. #2
    New Member
    Join Date
    Jun 2003
    Posts
    9
    draybu,
    I have been trying to embed an excel sheet in a webpage myself, and was wondering how you did it. Any help would be appreciated.
    Sunil.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    5
    I didn't actually embed the excel form myself, I post it to a "replication" server that places a link on our reporting page that allows users to click and pull up a read only copy of the report through their browser.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width