Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide Some Text in a Cell | Excel Discussion (Misc queries) | |||
Hide text in shaded cell | Excel Worksheet Functions | |||
Hide Column - With text in cell | Excel Programming | |||
Is there a way to hide text in a cell? | Excel Discussion (Misc queries) | |||
Hide text that doesn't fit in the cell | Excel Discussion (Misc queries) |