Hello,
I've made one mistake already. Sorry for that: I've declared dbTable as integer => it should be a double.
If you are certain that in every A5 cell is a number, you could try this first.
The changing of sheetnames doesn't matter except for your last sheet(in mine example the "test" sheet).
I've adtapted the example for the string version, I will also give a short explanation of the program:
Private Sub CommandButton1_Click()
Dim intCounter As Integer
Dim intIndex As Integer
Dim strTable(100) As String
intCounter = 1
intIndex = 0
Do While intCounter < ActiveWorkbook.Sheets.Count
'Select next sheet
Sheets(intCounter).Select
'Load value in table (from every sheet)
strTable(intIndex) = ActiveSheet.Range("A5").Value
intIndex = intIndex + 1
intCounter = intCounter + 1
Loop
Sheets("Test").Select
'Start filling data on row 7
intCounter = 7
intIndex = 0
Do While strTable(intIndex) <> ""
'In the example with the dbTabel it has to be 0 because we work
'with numbers(integer,double)
ActiveSheet.Cells(intCounter, 1).Value = strTable(intIndex)
'1 3 5 7 ....
intIndex = intIndex + 2
intCounter = intCounter + 1
Loop
End Sub
Display More
Dim intCounter As Integer
Dim intIndex As Integer
Dim strTable(100) As String
intCounter is a counter that we use to loop every worksheet, so instead of using a name I use a number(index) to select a sheet. Sheets(1).select, sheets(2).select, ....
intindex is used for loading the table(first entrance=0)
strTable(100) is an array of strings in this case who can have max 101 items(0-100) => in this array we load every A5 value of every sheet, example:
sheet(1) strtable(0)=5
sheet(2) strtable(1)=2
sheet(3) strtable(2)=7
....
intCounter = 1
intIndex = 0
First sheet and first entrance of the table
Do While intCounter < ActiveWorkbook.Sheets.Count
'Select next sheet
Sheets(intCounter).Select
'Load value in table (from every sheet)
strTable(intIndex) = ActiveSheet.Range("A5").Value
intIndex = intIndex + 1
intCounter = intCounter + 1
Loop
Looping the sheets and loading the data of every sheet(except last sheet)=> automatically
Sheets("Test").Select
'Start filling data on row 7
intCounter = 7
intIndex = 0
Do While strTable(intIndex) <> ""
ActiveSheet.Cells(intCounter, 1).Value = strTable(intIndex)
'1 3 5 7 ....
intIndex = intIndex + 2
intCounter = intCounter + 1
Loop
Selecting the "test" sheet => has to be your last sheet where you want to fill in the data. The counter is here used to present the row here you want to put the data. The intindex is the entrance of the table.
So if you initialise the index to 0 (you start with the value of sheet1), +2 after filling in means that you get strtable(2) => means values of sheet3(sheet2 is skipped). If you want to start with the value of sheet2 and then sheet4, .... you should initialize the index to 1.
I hopes this clears things up for you.
Gollem