I am trying to copy from one sheet and paste on all sheets with a number for the name. I'm stuck on the part where you select the receiving sheets.
[vba]Sub copy()
'
'
Dim MyArray() As String 'Dimension an array as string type
Dim iLoop As Integer 'Dimension a variable as integer to be used for a loop
Dim Cnt As Integer 'Dimension a variable as integer for a counter for each sheet named group
' Start a loop through all sheets in the workbook
For iLoop = 1 To Sheets.Count
' Check if the sheets has "a number"
If Worksheets(iLoop).Name Like "#*" Then
' Sheet Match Found So Count
Cnt = Cnt + 1
' Redimension the array and preserve any existing entrys
ReDim Preserve MyArray(Cnt)
' Add the sheet to the array
MyArray(Cnt) = Worksheets(iLoop).Name
End If
Next iLoop
' Check if the array contains any sheets and if so select them
If UBound(MyArray) > 0 Then Worksheets(MyArray).Select
Sheets(VarArray).FillAcrossSheets Worksheets("Last").Range("BP1O4")
Range("B32").Select
End Sub[/vba]
Edited to add:
I did originally post my question here: at Egghead Cafe with my original code. (see link below)