Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default ActiveSheet.PrintOut - problem

Hello,
Someone created an excel file with some fancy
stuff. On menu like window there are buttons
for printing reports. When I try to use them, all
I get is an error message
"Run-time error '1004'
Printout method of worksheet class failed"
if I try to debug it points to "ActiveSheet.PrintOut"
line.
Any idea how to fix it?
Thank you


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default ActiveSheet.PrintOut - problem

There are probably a number of possibilities for this
depending on what the code is doing before the PrintOut
statement.
For example, it is possible for no sheet to be Active.
Place the following line before the PrintOut line:
msgbox ActiveSheet.Name

You may need to post more information about the routine.

-----Original Message-----
Hello,
Someone created an excel file with some fancy
stuff. On menu like window there are buttons
for printing reports. When I try to use them, all
I get is an error message
"Run-time error '1004'
Printout method of worksheet class failed"
if I try to debug it points to "ActiveSheet.PrintOut"
line.
Any idea how to fix it?
Thank you


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default ActiveSheet.PrintOut - problem

Thanks Mike,
Whole menu starts with a dialog window, which
contains some buttons. Those buttons have macros assigned. If I run just
macro, everything is fine.
macro sample:
Sub Cdncust_report()
'Application.ExecuteExcel4Macro String:="Report Manager"
'Application.ExecuteExcel4Macro String:="Report Manager"
'Application.ExecuteExcel4Macro String:=" REPORT.PRINT(""Cdn Customer
Package"",1)"
Sheets("Project Information").Activate
ActiveSheet.PrintOut
Sheets("Design Basis [Cdn]").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("Scrubber Specification [Cdn]").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("Costs [$Cdn]").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Worksheets("Project Information").Activate

End Sub
I created new Dialog window (Right click on the worksheet tab at the bottom,
insert, Dialog)
added one button and assign simple macro:
"Application.Goto Reference:="Reports!R14C5" "
still wouldn't work, I got " Method 'Goto' of object '_Application"
failed

????
Derek T.


"Mike" wrote in message
...
There are probably a number of possibilities for this
depending on what the code is doing before the PrintOut
statement.
For example, it is possible for no sheet to be Active.
Place the following line before the PrintOut line:
msgbox ActiveSheet.Name

You may need to post more information about the routine.

-----Original Message-----
Hello,
Someone created an excel file with some fancy
stuff. On menu like window there are buttons
for printing reports. When I try to use them, all
I get is an error message
"Run-time error '1004'
Printout method of worksheet class failed"
if I try to debug it points to "ActiveSheet.PrintOut"
line.
Any idea how to fix it?
Thank you


.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default ActiveSheet.PrintOut - problem

Thanks Mike,
Whole menu starts with a dialog window, which
contains some buttons. Those buttons have macros assigned. If I run just
macro, everything is fine.
macro sample:
Sub Cdncust_report()
'Application.ExecuteExcel4Macro String:="Report Manager"
'Application.ExecuteExcel4Macro String:="Report Manager"
'Application.ExecuteExcel4Macro String:=" REPORT.PRINT(""Cdn Customer
Package"",1)"
Sheets("Project Information").Activate
ActiveSheet.PrintOut
Sheets("Design Basis [Cdn]").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("Scrubber Specification [Cdn]").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Sheets("Costs [$Cdn]").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Worksheets("Project Information").Activate

End Sub
I created new Dialog window (Right click on the worksheet tab at the bottom,
insert, Dialog)
added one button and assign simple macro:
"Application.Goto Reference:="Reports!R14C5" "
still wouldn't work, I got " Method 'Goto' of object '_Application"
failed

????
Derek T.



"Mike" wrote in message
...
There are probably a number of possibilities for this
depending on what the code is doing before the PrintOut
statement.
For example, it is possible for no sheet to be Active.
Place the following line before the PrintOut line:
msgbox ActiveSheet.Name

You may need to post more information about the routine.

-----Original Message-----
Hello,
Someone created an excel file with some fancy
stuff. On menu like window there are buttons
for printing reports. When I try to use them, all
I get is an error message
"Run-time error '1004'
Printout method of worksheet class failed"
if I try to debug it points to "ActiveSheet.PrintOut"
line.
Any idea how to fix it?
Thank you


.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
name of the activesheet rasta Excel Programming 1 October 3rd 03 09:49 PM
problem using ActiveSheet in VB sub Matt[_12_] Excel Programming 1 August 22nd 03 10:51 PM
ActiveSheet.Name? Andrew Stedman Excel Programming 5 July 30th 03 01:17 PM
ActiveSheet Graham[_3_] Excel Programming 0 July 30th 03 09:08 AM
ActiveSheet Graham[_3_] Excel Programming 0 July 29th 03 04:47 PM


All times are GMT +1. The time now is 04:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"