print hidden values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet that has two cells that I have hidden by going into
format cells to number and typed ;;; (3 semicolons) in the type box.

I would like to be able to have the sheet print without the value showing on
the screen. Does anyone know how to set a macro to allow hidden cells to
print?
 
Jeannine,

This might do it:

Sub PrintWithHidden()
Application.ScreenUpdating = False ' Prevent screen from showing hidden
stuff while printing
Range("A2").NumberFormat = "General" ' or whatever is appropriate for
printing the hidden cell
ActiveSheet.PrintOut
Range("A2").NumberFormat = ";;;" ' set it back
Application.ScreenUpdating = True
End Sub
 

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