I am using the code below to list worksheet names in column H. I want a number, starting with 1 for the first sheet name, to be listed next to sheet namr in column G.<pre>Sub WS_List3()
Dim wks As Worksheet
Dim x As Integer 'declares x as an interger
With Sheet2.Cells
.Range("G:G").ClearContents
.Font.Name = "Arial"
.Font.Size = 8
.IndentLevel = 1
End With
x = 2
For Each wks In Worksheets
x = x + 1
Sheet2.Cells(x, 8) = wks.Name
Next wks
End Sub</pre>
This message was edited by em on 2002-10-18 00:49
This message was edited by em on 2002-10-18 00:49
Dim wks As Worksheet
Dim x As Integer 'declares x as an interger
With Sheet2.Cells
.Range("G:G").ClearContents
.Font.Name = "Arial"
.Font.Size = 8
.IndentLevel = 1
End With
x = 2
For Each wks In Worksheets
x = x + 1
Sheet2.Cells(x, 8) = wks.Name
Next wks
End Sub</pre>
This message was edited by em on 2002-10-18 00:49
This message was edited by em on 2002-10-18 00:49