I have the following code to count the number of tabs that contain a specific word - eventually I want to create a column for each of the tabs and collect some data from it but I'm stuck right now on this:
VBA Code:
Sub count_shts()
Dim i As Integer
Dim sht As Worksheet
Dim shtName As String
If sht.Name Like "Summary*" Then 'THIS IS WHERE THE ERROR IS OCCURRING
For i = 0 To ActiveWorkbook.Worksheets.Count
Next i
MsgBox i
End If
End Sub