Hi Guys,
I want to find sheet name in excel vba with prefix name like "bYYYYMM"(e.g-b201308). how to write and help me.
Excel-VBA
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Ye Htut102 reputationPosted Aug 18, 2013, 7:15 PM EDT
Dim ws As Worksheet
For Each ws In Workbooks("SampleDataForMeter_2.xlsm").Worksheets
If ws.Name = Format(Now(), "b" & "YYYY-MM") Then
MsgBox "OK"
End If
Next ws
End Sub
it doesn't work