ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Var (https://www.excelbanter.com/excel-programming/290912-var.html)

Ionan

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


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com