View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
SU SU is offline
external usenet poster
 
Posts: 25
Default Visual Basic CheckBox Codes

Hi

I am currently working on an Excel spreadsheet and I have been using the
following type of coding for a number of CheckBoxes:

Private Sub CheckBox174_Click()
If CheckBox174.Value = True Then
Rows("193").Hidden = False
Rows("318").Hidden = False
Else
Rows("193").Hidden = True
Rows("318").Hidden = True
End If
End Sub

Am I able to name/label the rows so that I do not need to redo the coding
every time I insert or delete a row into the spreadsheet? If so, how would I
need to amend the above code?

Cheers