Good morning experts!
I'm trying to loop through worksheets as follows:
If ws.Name <> "DataTable" And ws.Name <> "Summary" Then ws.Activate
code to do some copy/paste stuff ....
Next ws
Try as I may, I can't get the code to skip the worksheets named "DataTable" and "Summary". Based on other posts, I've tried swapping out the And for an Or. Also tried using LCase(ws.Name), to no avail. Note that I'm acually trying to skip several other sheets as well but only listed two here for simplicity.
I suspect the problem is quite simple and right in front of my eyes, but I'm just not seeing it. I'm using Excel 2007 and know just enough VBA to limp along.
I'm trying to loop through worksheets as follows:
If ws.Name <> "DataTable" And ws.Name <> "Summary" Then ws.Activate
code to do some copy/paste stuff ....
Next ws
Try as I may, I can't get the code to skip the worksheets named "DataTable" and "Summary". Based on other posts, I've tried swapping out the And for an Or. Also tried using LCase(ws.Name), to no avail. Note that I'm acually trying to skip several other sheets as well but only listed two here for simplicity.
I suspect the problem is quite simple and right in front of my eyes, but I'm just not seeing it. I'm using Excel 2007 and know just enough VBA to limp along.