LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Hide text in a cell.

I have a CheckBox on a worksheet. I use this checkbox to display or "hide"
text. This code works fine until the worksheet is printed or saved as a PDF.
For example, if the Checkbox = False I can't see it on the worksheet, but I
can see it when it is printed out, why?


Private Sub chkShowTotal_Click()

Dim myTotal As Range
Dim EndRow As Long


'applies theSub Total on the QUOTE sheet
Set myTotal = Sheets("QUOTE").Columns("G:G").Find(What:="TOTAL", _
After:=Cells(10, 7), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlRows, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False)

ActiveSheet.Unprotect "AdTech"

'shows or hides Total and Sub Total
If chkShowTotal = True Then
myTotal.Offset(-3, 1).Font.ColorIndex = 0 'Sub Total
myTotal.Offset(0, 1).Font.ColorIndex = 0 'Total
Else
myTotal.Offset(-3, 1).Font.ColorIndex = 2 'Sub Total
myTotal.Offset(0, 1).Font.ColorIndex = 2 'Total
End If

ActiveSheet.Protect "AdTech"

End Sub
--
Cheers,
Ryan
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Some Text in a Cell DOUG Excel Discussion (Misc queries) 4 January 8th 10 09:16 PM
Hide text in shaded cell mmb Excel Worksheet Functions 3 November 3rd 06 04:45 PM
Hide Column - With text in cell O&O Excel Programming 5 November 9th 05 01:07 PM
Is there a way to hide text in a cell? IT Assistant Excel Discussion (Misc queries) 2 April 27th 05 03:52 AM
Hide text that doesn't fit in the cell Rene Excel Discussion (Misc queries) 1 December 16th 04 04:34 PM


All times are GMT +1. The time now is 10:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"