+ Reply to Thread
Results 1 to 2 of 2

Print dialog command works on PC but not MAC

Hybrid View

  1. #1
    Registered User
    Join Date
    02-11-2016
    Location
    Wisconsin
    MS-Off Ver
    07-360
    Posts
    53

    Print dialog command works on PC but not MAC

    I am running the following code to print using a dialogue box in a worksheet that I am using. The problem is, when tested on a PC (2007, 2013, 360) everything works. I have sent the file out at work and people using Macs are currently unable to print. I was wondering if anyone out there knows what is going on.
                'Prints the Report
                MsgBox ("Load pink paper into the printer." & vbNewLine & "Press 'OK' when done.")
                If Application.Dialogs(xlDialogPrinterSetup).Show = True Then
                    With Sheets("Print")
                        .Visible = True
                        .PrintOut Copies:=1, Collate:=True
                        .Visible = False
                    End With
                    Application.ScreenUpdating = True
                    Worksheets("Program List").Activate
                    MsgBox ("The report has been printed")
                Else
                    Worksheets("Print").Visible = False
                    Worksheets("Program List").Activate
                    MsgBox ("The print has been canceled")
                End If
    While debugging, the error occurred (Macs only) at this line
     If Application.Dialogs(xlDialogPrinterSetup).Show = True Then
    Any help would be greatly appreciated!

  2. #2
    Registered User
    Join Date
    02-11-2016
    Location
    Wisconsin
    MS-Off Ver
    07-360
    Posts
    53

    Re: Print dialog command works on PC but not MAC

    I figured it out! I was unable to get it to use the if print is true feature on the mac, but I am not worried about it. I hope that this can help somebody else!
                'Prints the Report
                MsgBox ("Load pink paper into the printer." & vbNewLine & "Press 'OK' when done.")
                #If Mac Then
                    Application.Dialogs(xlDialogPrint).Show
                        Application.ScreenUpdating = True
                        Worksheets("Program List").Activate
                         Sheets("Print").Visible = False
                         MsgBox ("Thank you")
                #Else
                    If Application.Dialogs(xlDialogPrinterSetup).Show = True Then
                        With Sheets("Print")
                            .Visible = True
                            .PrintOut Copies:=1, Collate:=True
                            .Visible = False
                        End With
                        Application.ScreenUpdating = True
                        Worksheets("Program List").Activate
                        MsgBox ("The report has been printed")
                    Else
                       Worksheets("Print").Visible = False
                       Worksheets("Program List").Activate
                        MsgBox ("The print has been canceled")
                    End If
                #End If
                End If

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Print Macro errors on final print command. Run-time error '1004':
    By Steverizer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2013, 06:41 PM
  2. VBA command works in Userform but not in Worksheet
    By neurosis737 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2011, 07:39 AM
  3. [SOLVED] open print dialog (File ---> Print...)
    By snaggy^^ in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-21-2006, 02:30 PM
  4. Change Print Command or add a new print command
    By Daniel R. Young in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2005, 01:20 AM
  5. [SOLVED] printing multiple print areas with a print dialog box
    By LHaro in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-17-2005, 05:05 PM
  6. Any way to get print dialog from Print Preview?
    By Colin Higbie in forum Excel General
    Replies: 15
    Last Post: 05-10-2005, 09:06 AM
  7. [SOLVED] how do I set up a command button that works with a combo box
    By liarspoker in forum Excel General
    Replies: 1
    Last Post: 04-06-2005, 10:06 AM
  8. Print Dialog from VBA
    By shagthewag in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2005, 01:06 AM

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