Printing without seeing the sheet

  • Thread starter Thread starter DBishop
  • Start date Start date
D

DBishop

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top