View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default VBA not selecting worksheet with titles

Try...

Sub ConsolidateHoldings2()
Dim wks As Worksheet

Sheets("Master").Cells.Clear
For Each wks In ActiveWorkbook.Worksheets
If UCase$(Right(wks.Name, 11)) = "TESTING.COM" Then
With wks
.Range("F2") = "Hi"
.Range("F4") = "Please review the data on the left"
.Range("F6") = "If this is incorrect, please advise!"
.Range("F8") = "Thanks"
End With 'wks
End If
Next 'wks
End Sub 'ConsolidateHoldings2

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion