jbesclapez
Active Member
- Joined
- Feb 6, 2010
- Messages
- 275
Hello Mr Excel,
I hope you are fine.
I am not but will be soon as i am pretty sure you can help me.
I am trying to run a macro on excel 2010 on a XLS file. (old version excel).
The macro should work but i can not find why it is not working.
This macro works : (I only exclude one worksheet called Document Map)
But this macro where i add a line with an OR is not working...
Please note that the worksheet Projects-Interv is not in the workbook yet.
Here is the other macro it is calling (if you need it)
Thanks for your usual help. Always appreciated.
I hope you are fine.
I am not but will be soon as i am pretty sure you can help me.
I am trying to run a macro on excel 2010 on a XLS file. (old version excel).
The macro should work but i can not find why it is not working.
This macro works : (I only exclude one worksheet called Document Map)
Code:
Sub Loop2Working()
Dim sht2 As Worksheet
ActiveWorkbook.Worksheets
For Each sht2 In Worksheets
If sht2.Name <> "Document map" Then
sht2.Activate
Call DeleteRow
Else
Range("A1:B1").Select
End If
Next sht2
End Sub
But this macro where i add a line with an OR is not working...
Code:
Sub Loop2Working()
Dim sht2 As Worksheet
ActiveWorkbook.Worksheets
For Each sht2 In Worksheets
If sht2.Name <> "Document map" [COLOR=Red]OR _[/COLOR]
If sht2name <> "Projects-Interv" Then
sht2.Activate
Call DeleteRow
Else
Range("A1:B1").Select
End If
Next sht2
End Sub
Please note that the worksheet Projects-Interv is not in the workbook yet.
Here is the other macro it is calling (if you need it)
Code:
Sub DeleteRow()
Range("E6:E1000").SpecialCells(xlCellTypeBlanks).Select
Selection.EntireRow.Delete
Range("A1").Select 'Get back to top of Sheet
End Sub
Thanks for your usual help. Always appreciated.