Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Excel 5.0 print problem

Been working with OP who is getting an error message 'PrintOut method of
worksheet class failed'. He has three checkboxes and two buttons on a dialog
box (forerunner of UserForm). The controls are from the Forms toolbar. He
has the checkboxes linked to cells A1, A2 and A3 respectively on Sheet 2. He
has this code tied to the command button, not as a click event, but as a run
command.

Sub PRNT()
Dim c As Range
With Sheets("Sheet2")
For Each c In .Range("A1:A3")
If c.Address = "$A$1" And c = "True" Then
Sheets("Sheet1").PrintOut
ElseIf c.Address = "$A$2" And c = "True" Then
Sheets("Sheet2").PrintOut
ElseIf c.Address = "$A$3" And c = "True" Then
Sheets("Sheet3").PrintOut
End If
Next
End With
MsgBox "Sheets for all checked boxes have printed"
End Sub

The code works on my xl2003 system with a similar setup on a userform, so I
am stumped. Does anyone know of any peculiarities of the old xl5.0 software
that would cause this glitch?




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
Print problem in Excel 2007 Eric_G Excel Discussion (Misc queries) 0 November 3rd 09 04:31 PM
Print Preview Problem in Excel Alex Excel Discussion (Misc queries) 1 August 19th 08 01:23 PM
Excel vba print file to pdf (Problem) chowing0823 Excel Programming 3 March 6th 06 02:15 PM
Excel/VBA - Custom print range problem Gixxer_J_97[_2_] Excel Programming 2 December 7th 05 06:07 PM
In Excel print area setup problem with 2 different computers with. Rafi Setting up and Configuration of Excel 1 December 22nd 04 10:44 AM


All times are GMT +1. The time now is 03:32 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"