[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

Apply format to certain worksheets in workbook

I need to be able to apply conditional formats to certain sheets in an excel file.
This is what I have:

Open in new window

Dim vSheets As Variant
Dim wb As Workbook

Set wb = ThisWorkbook

vSheets = Array("Referrals", "MessagesLeft", "ServiceLevel", _
        "RPC_NoPTP_NoReferral_Cnt", "RPC_NoPTP_NoReferral_%", "Download", "Attempts", "DialerConnects")
For Each vSheets In wb.Worksheets

Variance
Next vSheets
0
DCUnited
Asked:
DCUnited
1 Solution
 
Saqib Husain, SyedEngineerCommented:
I assume that variance is a sub. You can have something like

vSheets = Array("Referrals", "MessagesLeft", "ServiceLevel", _
        "RPC_NoPTP_NoReferral_Cnt", "RPC_NoPTP_NoReferral_%", "Download", "Attempts", "DialerConnects")
For Each vsheet In vSheets
wb.Worksheets(vsheet).Activate
Variance
Next vsheet
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now