This is the first time I have ever built a macro in excel.
I have opened the VB Script editor & entered the following code into my VBA Project:
Sub collate()
Dim a As Integer
Sheets.Add.Name = "Summary"
For a = 2 To Sheets.Count
Cells(a, 1) = Worksheets(a).Name
Cells(a, 2) = Worksheets(a).Cells(8, 6) 'F8
Cells(a, 3) = Worksheets(a).Cells(8, 7) 'G8
Next a
endsub
When comiling within the editor (& wen running the macro in excel) i get the following error:
"Compile error: Sub or Function not defined"
Can anyone assist?
I have opened the VB Script editor & entered the following code into my VBA Project:
Sub collate()
Dim a As Integer
Sheets.Add.Name = "Summary"
For a = 2 To Sheets.Count
Cells(a, 1) = Worksheets(a).Name
Cells(a, 2) = Worksheets(a).Cells(8, 6) 'F8
Cells(a, 3) = Worksheets(a).Cells(8, 7) 'G8
Next a
endsub
When comiling within the editor (& wen running the macro in excel) i get the following error:
"Compile error: Sub or Function not defined"
Can anyone assist?