LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Print macro won't work

Can someone please troubleshoot this code for me? For some reason,
when I click on the autoshape that is assigned this macro, the printer
will spool however it does not print. The Deskjet is not my default
printer (because of some error with MS Word 07 that causes Word to
stop working) if that helps. Code is below. Thanks.


Sub PrintSheet()
'
' PrintSheet Macro
'

'


Dim resp As Long
resp = MsgBox("Printing will clear all data. Do you still want to
print?", vbYesNo)
If resp = vbNo Then Exit Sub

Application.ActivePrinter = "HP Deskjet F2100 series on Ne04:"
ActiveWindow.SmallScroll Down:=-36
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Range
("A5:D5,E5:G5,H5:I5,A7:D7,E7:G7,H7:I7,G9,H9,I9,G10 ,H10,I10").Select
Range("I10").Activate
ActiveWindow.SmallScroll Down:=16
Range( _
"A5:D5,E5:G5,H5:I5,A7:D7,E7:G7,H7:I7,G9,H9,I9,G10, H10,I10" _
).Select
Range("I10").Activate
Selection.ClearContents
End Sub
 
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 button macro & specific tabs to print Chuck[_3_] Excel Worksheet Functions 2 November 22nd 07 12:21 AM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM
Macro to open print window and set to print entire workbook retseort Excel Discussion (Misc queries) 1 October 27th 05 11:00 PM
Create a print macro that would automatically select print area? wastedwings Excel Worksheet Functions 7 August 22nd 05 10:36 PM
i want to print 70 work book and i dont want to open each n print sid Excel Discussion (Misc queries) 0 April 28th 05 12:08 PM


All times are GMT +1. The time now is 10:09 PM.

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

About Us

"It's about Microsoft Excel"