LePig
09-01-2016, 03:33 AM
Hi,
I want to display my results in a Cell/column in a specific sheet(test) on a button click.
I have this piece of code below. Which is giving the names of all visible sheets but i need them to go to a specific place in that sheet.
Dim ws As Worksheet, ws1 As Worksheet
Set ws1 = Sheets("Test")
i = 1
ws1.Columns(1).Insert
For Each ws In ThisWorkbook.Worksheets
If ws.Visible = xlSheetVisible Then
ws1.Cells(i, 1) = ws.Name
i = i + 1
End If
Next ws
Any help would be much appreciated.
Many thanks
I want to display my results in a Cell/column in a specific sheet(test) on a button click.
I have this piece of code below. Which is giving the names of all visible sheets but i need them to go to a specific place in that sheet.
Dim ws As Worksheet, ws1 As Worksheet
Set ws1 = Sheets("Test")
i = 1
ws1.Columns(1).Insert
For Each ws In ThisWorkbook.Worksheets
If ws.Visible = xlSheetVisible Then
ws1.Cells(i, 1) = ws.Name
i = i + 1
End If
Next ws
Any help would be much appreciated.
Many thanks