E
Eric
The following coding works fine, but once I change following code
"If CStr(d.Value) = ws.Name Then DelFlag = False"
into
"If CStr(d.Value) = ws.Name Then "
"DelFlag = False"
I would like to do it, so during the debugging process, I can see whether
this line is proceeded or not.
It pops up a message about Next without For,
Does anyone have any suggestions on where is the problem?
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Date" Then
For Each d In MyRange
If CStr(d.Value) = ws.Name Then DelFlag = False
Exit For
End If
Next
If DelFlag Then
ws.Delete
End If
DelFlag = True
Next
"If CStr(d.Value) = ws.Name Then DelFlag = False"
into
"If CStr(d.Value) = ws.Name Then "
"DelFlag = False"
I would like to do it, so during the debugging process, I can see whether
this line is proceeded or not.
It pops up a message about Next without For,
Does anyone have any suggestions on where is the problem?
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Date" Then
For Each d In MyRange
If CStr(d.Value) = ws.Name Then DelFlag = False
Exit For
End If
Next
If DelFlag Then
ws.Delete
End If
DelFlag = True
Next