Archive of Mr Excel Message Board


Back to Excel VBA archive index
Back to archive home

1. Hide but still print 2. Hide,lock and e-mail.

Posted by Mac on December 04, 2001 5:48 AM
Two questions relating to hiding:

On a single sheet I have a range where users input quotation details. This populates another range that has been set up as the print range.

1. How do I still print colomns tat has been hid from the users view ?

2. How can I hide and lock the input range prior to sending via e-mail to clients? The input range is confidential. I know it can be done ad hoc per sheet, but need a method to hide multiple sheets within the workbook.

Thanks

mac.


Check out our Excel VBA Resources

Re: 1. Hide but still print 2. Hide,lock and e-mail.

Posted by jacob on December 04, 2001 11:35 PM
This should help

To hide and unhide columns use this
range("hidden range").select
Selection.EntireColumn.Hidden = False

Also I like this method to block users from viewing data. Lock the sheet and make the cells hidden and use this that way the user can only scroll in the range you want.
Sheets("Sheet Name").ScrollArea = "A1:z100"

to hide the whole sheet use:
activesheet.visible=false

To unhide all sheets in a workbook this could work:
sub test()
for x=1 to 1000
on error goto z:
sheets(x).select
activesheet.visible=true
next x
z:
end sub

Hope this helps


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.