Advertisement
mukeshdak

2023-11-26_vba list all the sheets in a page

Nov 26th, 2023
1,883
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VBScript 0.21 KB | Source Code | 0 0
  1.  'vba list all the sheets in a page
  2.  
  3. Dim ws As Worksheet
  4. Dim x As Integer
  5. x = 1
  6. Sheets("Sheet1").Range("A:A").Clear
  7.  
  8. For Each ws In Worksheets
  9.      Sheets("Sheet1").Cells(x, 1) = ws.Name
  10.      x = x + 1
  11. Next ws
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement