Results 1 to 2 of 2

PrintPreview showing double printers

Threaded View

  1. #1
    Registered User
    Join Date
    03-17-2014
    Location
    Bradford
    MS-Off Ver
    Excel 2003
    Posts
    1

    PrintPreview showing double printers

    I have just spent the last couple of days creating a Risk Assessment spreadsheet and have used a very useful tutorial that I found online for creating a picklist and print button to generate a list of worksheets and print the selected ones.

    the code is as follows :

    Sub Print_Sheets()
    Dim i As Long, c As Long
    Dim SheetArray() As String
    
    With ActiveSheet.ListBoxSh
    
    For i = 0 To .ListCount - 1
    If .Selected(i) Then
    ReDim Preserve SheetArray(c)
    SheetArray(c) = .List(i)
    c = c + 1
    End If
    Next i
    
    Sheets(SheetArray()).PrintPreview
    
    'If you'd like to print out
    'Sheets(SheetArray()).PrintOut
    
    End With
    
    End Sub
    This is the first time I have used VBA and I have checked the print preview throughout to check that each worksheet looks as I want it to. All has been very successful.

    I have now tried to actually print a workbook and all goes well, selected sheets are sent to print preview etc but when clicking print, all printers are doubled up in the printer selection box and when a printer is selected, the documents print twice, even the PDF option runs the PDF creator twice.

    Printers are only shown once when using standard print options. It seems to be the “Sheets(SheetArray()).PrintPreview” command that’s doing it.

    I have tried the spreadsheet on a different computer, different network & printers and still the same result.

    Can anyone help ?
    Last edited by Pepe Le Mokko; 04-23-2020 at 03:24 AM. Reason: Code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Printpreview
    By RJ1969 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-09-2019, 10:22 PM
  2. PrintPreview
    By oddbjorn-j in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2017, 10:56 AM
  3. Double accounting line showing as single
    By lemonbug in forum Excel General
    Replies: 2
    Last Post: 05-12-2017, 05:12 PM
  4. excel drill down double click showing more on mac than pc
    By Jack7774 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 11-16-2016, 06:00 PM
  5. Populate a combobox with a list of printers found on the (devices/printers) window
    By vladlock in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-12-2014, 08:10 AM
  6. Double border is showing when printed
    By Scott Cholewinski in forum Excel General
    Replies: 1
    Last Post: 11-12-2008, 02:47 PM
  7. printpreview
    By Alex in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-12-2005, 06:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1