Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Printing without seeing the sheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DBishop@fujikoki.com - 03 Dec 2006 04:39 GMT
I am having a user input some info.  The info gets tested, another
hidden form gets the data applied to the proper cells and then printed.

Q1  How can I print the correctly filled sheet without making it
visible?
Q2  Will I have to create another instance of excel to do this?
       How can I create the other instance and keep it hidden?
        etc...

Tks
DB
wisccal@googlemail.com - 03 Dec 2006 08:45 GMT
Hi DB,

You must unhide it before you can print it. To prevent the worksheet
from becoming visible, use Application.ScreenUpdating = False. I got
the following Sub from another thread:

=========================
Public Sub printHiddenWs(ByVal ws As Excel.Worksheet)
Dim hidden As Long
With ws
 .Application.ScreenUpdating = False
 hidden = .Visible
 .PrintOut
 .Visible = hidden
 .Application.ScreenUpdating = True
End With
End Sub
=========================

Regards,
Steve
www.stkomp.com

> I am having a user input some info.  The info gets tested, another
> hidden form gets the data applied to the proper cells and then printed.
[quoted text clipped - 7 lines]
> Tks
> DB
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.