Question
March 8, 2007 at 02:06 AM
leocoppens

“If CheckBox1.Value = True Then” what’s wrong here?

by leocoppens . Updated 18 years, 4 months ago

I have a problem using the checkbox since what I want to use is not the checkboxe’s click event, i only need to use his value.
I’ll try to explain with the code:

On Sheet1 I have a Cmdbutton, when you click it it does this,

Private Sub CommandButton1_Click()

eraser
copynetcode01
copynetcode02
copynetcode03
copynetcode04
copynetcode05
copynetcode06
copynetcode07
copynetcode08
copynetcode09
copynetcode10
copynetcode11
copynetcode12
ordering
sort
deleteduplicates
applyformulas
delete_empty
sheetformat

End Sub

There are going to be 12 checkboxes (one for each copynetcode sub routine), they have to act as filters, here is the code of one of them (but it’s wrong because it says there’s a problem on the first line)

Sub copynetcode01()

If CheckBox1.Value = True Then

Range(“A5”).Select
ActiveCell.FormulaR1C1 = “a”
Range(“A6”).Select
Sheets(“Jan”).Select
Range(“A9”).Select
Range(“A9,A450”).Select
Selection.Copy
Sheets(“Call”).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _:=False, Transpose:=False

Else
End If

End Sub

Can anybody HELP ME to solve this checkbox problem?

THANK YOU ALL IN ADVANCE

This discussion is locked

All Comments