Macro only for Alphabetic Sheets [Solved/Closed]

Report
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
-
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
-
Hello,

I would like to request for a Macro which will run only for those sheets where Names started with Alphabets from A to Z

Thanks & Regards

1 reply

Posts
2757
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
June 8, 2021
462
Hi Smuneeb,

Try the following code, where you enter your code where the green text is:
Sub RunMe()
Dim ws As Worksheet
Dim CheckNum As Double

For Each ws In Worksheets
    ws.Select
    On Error GoTo MyCode
    CheckNum = Left(ws.Name, 1)
Next ws

Exit Sub
MyCode:
'Your code here
Resume Next

End Sub


Best regards,
Trowa
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
1
Hi
TrowaD
Highly appreciable for your work

Thanks & Regards

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!