Printing checkboxes in Excel 97

  pickle factory 18:08 26 Jun 2006
Locked

I have a column of checkboxes linked to the respective cells that they are positioned in, and when I print the sheet, the print shows the 'TRUE' or 'FALSE' in the cells as well as the checkbox with/without check. I don't want to see the TRUE/FALSE statement on the print. I have tried making the font colour in each cell the same as the fill colour, this hides the text on the sheet, but it still prints it. Also tried using the 'Print Object' box in the checkbox properties, but that just prints the TRUE/FALSE and not the checkbox. Can I tell Excel to NOT print the checkbox status? Thanks

  VoG II 18:17 26 Jun 2006

Can you not hide the column with TRUE/FALSE before printing?

  VoG II 18:49 26 Jun 2006

Option Base 1
Sub test2()
Dim c As Range, Rng As Range, OldVal(10) As Boolean, N As Integer
N = 0
Set Rng = Range("B1:B10")
For Each c In Rng
N = N + 1
OldVal(N) = c.Value
c.Value = ""
Next c
ActiveSheet.PrintOut
N = 0
For Each c In Rng
N = N + 1
c.Value = OldVal(N)
Next c
End Sub

You will need to change "B1:B10" and the 10 in OldVal(10) to suit the number of rows, and instead of N=0 (which occurs twice) N = <first row> -1

  pickle factory 20:27 26 Jun 2006

Cheers, but not quite what I'm after. I want to print the checkboxes, with their relevant ticks or not, so hiding the column is a no no and IF I've used your code correctly, (Probably unlikely), then that just unchecked all the boxes. It did, however, only print the checkboxes and not the TRUE/FALSE statement. This is what I ran, did I change the correct N=0 ?


Sub test2()
Dim c As Range, Rng As Range, OldVal(72) As Boolean, N As Integer
N = -1
Set Rng = Range("F16:F87")
For Each c In Rng
N = N + 1
OldVal(N) = c.Value
c.Value = ""
Next c
ActiveSheet.PrintOut
N = 0
For Each c In Rng
N = N + 1
c.Value = OldVal(N)
Next c
End Sub

Thanks

  VoG II 20:32 26 Jun 2006

If this workbook does not contain state secrets, your bank statement or whatever can you send it to me? Or anonymise the information in some way.

N should be 0 I think but there is a flaw in my code as it will untick all the boxes before it prints.

Why is hiding the column with TRUE/FALSE a no-no - I thought that the checkboxes were in another column?

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Converse's new logo: the trainer brand looks to its heritage for a fresh identity

Mac power user tips and hidden tricks

Comment lancer Windows 10 en mode sans ├ęchec ?