Hiding Columns
Hi
if you have merged cells I don't think you can do something against it.
Not tested but try:
range("K1").entirecolumn.hidden=true
--
Regards
Frank Kabel
Frankfurt, Germany
"Squid" schrieb im Newsbeitrag
news:CWPkd.496469$mD.389336@attbi_s02...
I have a spreadsheet where I recreated a standard form my company
uses.
Therefore I needed to merged some rows. There is one column that I
would
like to hide from being printed.
If I manually highlight column K, (right click) click Hide. It hides
just
column K. no problem.
But if I when use the following code in the BeforePrint event it will
hide
more than just column K, I assume because there rows within column K
that
are merged.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Columns("K:K").Select
Selection.EntireColumn.Hidden = True
End Sub
Any suggestions?
TIA
Mike
|