Excel Macro

  • Thread starter Thread starter jerry chapman
  • Start date Start date
J

jerry chapman

How can I find the sheet names for an Excel program, by using a macro?
 
Sub test()
Dim sh As Object
For Each sh In ActiveWorkbook.Sheets
MsgBox sh.Name
Next
End Sub

HTH. Best wishes Harald
 
What do you mean "sheet names for ... program"? Sheetnames relate to a
workbook, not to a macro code. Or do you mean Module names?

If the latter, I believe you can find help on using routines in the VB
Extensibility library by going to www.cpearson.com.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top