suresh7860
New Member
- Joined
- Jul 18, 2015
- Messages
- 48
Hi Experts
I am new here and trying to learn things by looking at experts and need your help to get my code corrected.
I have created a vba code using loop - For / next code which is working fine when i use only one sheet name which doesn't need to get summarized like below:
For Each w In Worksheets
If w.Name <> "Summary" Then
With w
My code
End WITH
Next
but when i am trying to use array with sheet names which is not required to summarize. I am getting error when i am writing the code using array itself, it looks very silly but i almost spend 8 days to find out what i am doing wrong, would be great help if any of your correct me with this:
Code used
For Each w In Worksheets
If w.Name <> Array("Summary", "Not Certified", "STAT Reconciliations", "Blank Account#", "Blank Description", "Blank Line#", "Blank Reference", "Prepd Rec's-Unidentified Bal>1", "Preparere Unassigned", "Approver Unassigned", "Reviewer Unassigned", "Acct Reviewer Unassigned", "Acct Owner Unassigned", "Key should be Non-Key", "Non-Key should be Key", "Blank Risk Rating", "Timelines", "Recon WorkFlow") Then
With w
My code
End WITH
Next
Would be helpful if anyone can fix this!
Thanks a lot and have a great weekend for all of you
I am new here and trying to learn things by looking at experts and need your help to get my code corrected.
I have created a vba code using loop - For / next code which is working fine when i use only one sheet name which doesn't need to get summarized like below:
For Each w In Worksheets
If w.Name <> "Summary" Then
With w
My code
End WITH
Next
but when i am trying to use array with sheet names which is not required to summarize. I am getting error when i am writing the code using array itself, it looks very silly but i almost spend 8 days to find out what i am doing wrong, would be great help if any of your correct me with this:
Code used
For Each w In Worksheets
If w.Name <> Array("Summary", "Not Certified", "STAT Reconciliations", "Blank Account#", "Blank Description", "Blank Line#", "Blank Reference", "Prepd Rec's-Unidentified Bal>1", "Preparere Unassigned", "Approver Unassigned", "Reviewer Unassigned", "Acct Reviewer Unassigned", "Acct Owner Unassigned", "Key should be Non-Key", "Non-Key should be Key", "Blank Risk Rating", "Timelines", "Recon WorkFlow") Then
With w
My code
End WITH
Next
Would be helpful if anyone can fix this!
Thanks a lot and have a great weekend for all of you