Snippet of what I have:
I am making a list of certain sheets starting in A5. The If Not part worked fine until I put in the line refering to Range("M211")
"M211" changes from True to False depending on if a checkbox is checked or not.
If it is True I want the sheet name in my list. If False not in the list. Error message says Object required. I can't figure it out
Thanks
Harry
Code:
With Range("A5")
For Each sht In ActiveWorkbook.Worksheets
If Not (sht.Name = "INFO" Or sht.Name = "FAX" Or sht.Name = "SUMMARY" _
Or sht.Name = "PAG" Or sht.Name = "BUDGET" Then
If Worksheet.Range("M211") = True Then
ActiveCell.Value = sht.Name
ActiveCell.Offset(1, 0).Select
End If
End If
Next sht
I am making a list of certain sheets starting in A5. The If Not part worked fine until I put in the line refering to Range("M211")
"M211" changes from True to False depending on if a checkbox is checked or not.
If it is True I want the sheet name in my list. If False not in the list. Error message says Object required. I can't figure it out
Thanks
Harry