I was make a small VBA code which get me a list with all sheets names from my workbook, My question is:
How can I get values from Sheet7 ("B4:B5"),Sheet8 ("B4:B5"),Sheet ("B4:B5") ..... into Sheet6 which is present the following code:
Private Sub Worksheet_Activate()
Call task
End Sub
Sub task()
Call ThisWorkbook.speedOn
Dim pws As Worksheet
Dim x, N As Integer
Dim browLastCol As Range
Set pws = Sheets("Sheet6")
'Set browLastCol = pws.Range(Cells(3, 4), Cells(3, 4).End(xlToRight))
Set browLastCol = pws.Range(Cells(9, 2), Cells(9, 2).End(xlDown))
x = 9
pws.Range(Cells(3, 2), Cells(3, 2).End(xlToRight)).Clear
For Each ws In Worksheets
If ws.Name <> "Sheet1" Then
If ws.Name <> "Sheet2" Then
If ws.Name <> "Sheet3" Then
If ws.Name <> "Sheet4" Then
If ws.Name <> "Sheet5" Then
If ws.Name <> "Sheet6" Then
Sheets("Sheet6").Cells(x, 2) = ws.Name ' List woksheets name
x = x + 1
Sheets("Sheet6").Range("A3").RowHeight = 40
With browLastCol
.RowHeight = 26
'Some code removed
End With
End If
End If
End If
End If
End If
End If
Next ws
Call ThisWorkbook.speedOff
End Sub