Solved

If excel worksheet name <> "Summary" OR "SummaryClient" Then

Posted on 2012-03-23
2
299 Views
Last Modified: 2012-03-23
Hi Experts,

The code below works fine:
        If xlSheet.Name <> "Summary" Then
            xlSheet.UsedRange.ClearContents

But, I now need to adda second worksheet:
Attemtp 1: If excel worksheet name <> "Summary" OR "SummaryClient" Then
Attempt 2: If excel worksheet name <> Like "Summary*" Then

What's the best way to do this?

Thks in advance!
Steven
0
Comment
Question by:scsnow2310
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 61

Accepted Solution

by:
mbizup earned 250 total points
ID: 37757907
If xlSheet.Name <> "Summary"   AND xlSheet.Name <> "SummaryClient" Then
0
 

Author Closing Comment

by:scsnow2310
ID: 37757956
Great - Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question