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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Suppress Hidden Form Fields in Excel When Printing

Status
Not open for further replies.

DougTucker

Technical User
Jun 30, 2009
23
US
I have an Excel workbook with a combo box to choose a value. The form triggers VBA to selectively hide or display certain rows that apply to the selection (the rows contain groups of check-boxes that are also hidden with the rows). This works fine on the screen, but as soon as I print the form, the check-boxes from the hidden rows all become visible and land on top of existing text.

How can I keep the check-boxes hidden when the rows are hidden? I've checked the property to "Print Object" (because I DO want it to print when it's displayed). I just don't want it to print when it's hidden.

Thanks in advance for your help.
 



Hi,

If that's a problem, then simply assign the Visible property of each control in that row, FALSE and TRUE when the row becomes visible.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,

The problem is not just that they show up when I don't want them to (i.e., when I print). The bigger issue is that the fields MOVE when I print. On the screen they hide and re-appear just fine. When I print, ALL check-boxes get clustered to the bottom of the worksheet, then when I un-hide cells, they stay at the bottom, thus re-arranging the form fields. I then need to close the workbook without saving, and re-open the un-messed-up workbook.

I need to somehow bind the fields to a particular cell so it will always move (or hide/un-hide) with the row onto which it is bound.

Any other ideas?

~ Doug
 



Check to see if the Property has Move with cell.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I didn't see the property "Move with Cell". I fixed it by changing the type of check-box that I'm using. Rather than using the check-box available in Design mode, I used the check-box available on the Forms toolbar. That one has a different set of properties and (although I don't fully understand how it works differently), the fields are properly hiding with the rows, both on the screen and when printed.

I'm open to other feedback if you anticipate that I'll run into troubles down the road. For now it's working OK.

~ Doug T.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top