ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Macro (https://www.excelbanter.com/excel-programming/323609-excel-macro.html)

jerry chapman[_2_]

Excel Macro
 
How can I find the sheet names for an Excel program, by using a macro?



Harald Staff

Excel Macro
 

Sub test()
Dim sh As Object
For Each sh In ActiveWorkbook.Sheets
MsgBox sh.Name
Next
End Sub

HTH. Best wishes Harald

"jerry chapman" skrev i melding
m...
How can I find the sheet names for an Excel program, by using a macro?





Myrna Larson

Excel Macro
 
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.


On Sat, 19 Feb 2005 22:32:47 GMT, "jerry chapman"
wrote:

How can I find the sheet names for an Excel program, by using a macro?




All times are GMT +1. The time now is 02:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com