Advertisement

06.18.2008 at 08:31AM PDT, ID: 23495620
[x]
Attachment Details

Excel run time error 1004

Asked by RishiSingh05 in Microsoft Excel Spreadsheet Software

Tags: , , , ,

I have an Excel form and to print it I run the following macro:

This month when I tried to run the macro I got the following error message:

Run time error 1004
Method ActivePrinter of object _Application failed

And this line of the code is highlighted:

Application.ActivePrinter = "\\minncorp1\Minncorp-PRT5-Ricoh3045 on Ne02:"

Pls let me know how this line can be fixed.

Thanks.
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
Sub PrintForm()
' prints out the number of forms requested in cell B2, with incremental numbers
Application.ActivePrinter = "\\minncorp1\Minncorp-PRT5-Ricoh3045 on Ne02:"
ActiveSheet.Protect UserInterfaceOnly:=True
IDnum = Sheets("Printing Info").Range("B1").Value
 
For i = 1 To Range("B2").Value
    IDnum = IDnum + 1
    Sheets("FORM").Range("L2").Value = IDnum
    Sheets("FORM").PrintOut Copies:=2, Collate:=True, ActivePrinter:= _
        "\\minncorp1\Minncorp-PRT5-Ricoh3045 on Ne02:"
Next i
 
Sheets("Printing Info").Range("B1").Value = IDnum
 
End Sub 'PrintForm
[+][-]06.18.2008 at 08:33AM PDT, ID: 21814001

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 08:39AM PDT, ID: 21814067

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2008 at 08:54AM PDT, ID: 21814231

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Excel Spreadsheet Software
Tags: Microsoft, Office, 2007, Run-time error, Run-time error '1004' Method 'ActivePrinter' of object '_Application' failed
Sign Up Now!
Solution Provided By: rorya
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.18.2008 at 09:01AM PDT, ID: 21814306

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628