Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide or change display

Status
Not open for further replies.

Guthro

Technical User
Sep 9, 2006
107
GB
Is it possible to create a function in Excel and assign it to a button ?
The function would, at minimum, be to hide several columns or, at best, be able to change a worksheet to a printable layout rather than the onscreen view.
The reason behind this is that I have pricelists on screen that I refer to and use regularly but I also need to be able to print much of the same information as customer pricelists. However, customers mustn't see the cost price, margin or supplier columns.
In the past I have had two seperate lots of info to print but this can cause errors.

My Feeblegirl.com Forum boards for mmorpgs, sport, fun, politics...
 





Hi,

You have not full described the conditions under which the customer will be using the workbook. Will the customer be making changes to the sheet?

There could be a number of options.

Put ALL the sensitive data on another sheet that would be hidden.

Hide the columns containing sensitive data.

Consider using Worksheet Protection, so that hidden things cannot be made visible. Read Excel HELP on Protection, both Workbook and Worksheet Protection and understand the pros and cons.

Skip,

[glasses]Just traded in my old subtlety...
for a brand NUANCE![tongue]
 
If you are just printing the price lists not sending the worksheet then there are several ways to do this. For example:

1. To hide / unhide columns easily consider Data, Group and outline.

2.You can save settings such as hidden columns and print settings in View, Custom Views...

3. You can create a macro to do the sort of thing you describe and assign it to a button. Use the macro recorder to record yourself doing this. Then view and amend the code as necessary. If you go this route then post for any help in Forum707

Gavin
 
Skipvought.
It would be just for printing.
Sending a worksheet does happen but I think I'd still manually create a sheet specific for the customer.


Gavona.
Yes, that's probably a route to take. I've never ventured into macros but it looks like I will have to now.

Thanks, you two, for the input.

My Feeblegirl.com Forum boards for mmorpgs, sport, fun, politics...
 
Hi,

If you select those columns, or the print area you want to print for your customers, then you can use File / Print Area / Set Print Area, to set permanently the area you want to print. This will only print the columns specified. If you dont need to print the other (restricted) details then the problem is solved.

Another approach would be to set up a print sheet which contains formulas to display just the columns you print. Then you print this sheet only.

Good Luck!

Peter Moran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top