+ Reply to Thread
Results 1 to 6 of 6

A macro setting that would cause a Run-time error

  1. #1
    Registered User
    Join Date
    02-28-2008
    Posts
    36

    A macro setting that would cause a Run-time error

    Is there a setting within excel that could cause a user to get a run-time error 1004? I have a workbook with a macro that adds additional sheets to the workbook when a button is clicked. The thing works fine on my machine and 3 or 4 other machines that I have had guys test it out, but I have a user that it will not work for. He is at a location about 3 hours away so I cant see exactly what he is doing, but he says after he clicks the button he gets a run-time error 1004 that says "Unable to set the PrintQuality property of the Page Setup class". I'm thinking that it is a setting within excel? Any ideas?
    Last edited by westonkw; 05-11-2009 at 10:56 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: A macro setting that would cause a Run-time error

    Is he using a different version of Excel?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: A macro setting that would cause a Run-time error

    Does he have a default printer setup on his system? Sometimes if the MSFAX (default) or no printer installed you may get this error.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: A macro setting that would cause a Run-time error

    From Help:

    PrintQuality Property
    Returns or sets the print quality. Read/write Variant.

    expression.PrintQuality(Index)
    Index Optional Variant. Horizontal print quality (1) or vertical print quality (2). Some printers may not support vertical print quality. If you don’t specify this argument, the PrintQuality property returns (or can be set to) a two-element array that contains both horizontal and vertical print quality.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    02-28-2008
    Posts
    36

    Re: A macro setting that would cause a Run-time error

    He is using the same version of excel.

    I think the MSFAX thing may be an issue? I sent him an email asking what he is using for a printer waiting for a reply.

    Do you think If he switches his default printer this may take care of the issue?

    And if that is the problem is there a way to rewrite the code to eliminat the issue with this type of printer?

  6. #6
    Registered User
    Join Date
    02-28-2008
    Posts
    36

    Re: A macro setting that would cause a Run-time error

    It was a printer issue

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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