Thread: Var
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ionan Ionan is offline
external usenet poster
 
Posts: 1
Default Var

I have found the code below on a website but am trying to
amend it for my use.

PrintDlg = Dialogue sheet
cb = Checkbox
What I want is the value of the check box copied to a var
that i can use later in my program.

Does any one know how to do this...many many thanks from a
clueless amateur

currentSheet.Activate
Application.ScreenUpdating = True
If SheetCount < 0 Then
If PrintDlg.Show Then
For Each cb In PrintDlg.CheckBoxes
If cb.Value = xlOn Then

'Worksheets(cb.Caption).Activate
'ActiveSheet.PrintOut
' 'ActiveSheet.PrintPreview 'for
debugging
End If
Next cb
End If
Else
MsgBox "All worksheets are empty."
End If