Andreas Hermle
asked on
Retrieve the names of worksheets and display them in a MsgBox
Dear Experts:
On the currently open workbook I would like to perform the following action using VBA:
Retrieve the worksheets' names of all the worksheets of the currently open workbook with the exception of the sheets named 'Main', 'Calculation' and any sheets with the default names such as 'sheet1'.
The worksheet names are to be displayed in a MsgBox. I know that there is a character limitation on MsgBoxes.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
On the currently open workbook I would like to perform the following action using VBA:
Retrieve the worksheets' names of all the worksheets of the currently open workbook with the exception of the sheets named 'Main', 'Calculation' and any sheets with the default names such as 'sheet1'.
The worksheet names are to be displayed in a MsgBox. I know that there is a character limitation on MsgBoxes.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dear both,
great job from both of you. By combining the codes I am getting exactly the result I was looking for.
Regards, Andreas
great job from both of you. By combining the codes I am getting exactly the result I was looking for.
Regards, Andreas
You're welcome and I'm glad I was able to help.
Marty - MVP 2009 to 2013
Marty - MVP 2009 to 2013
ASKER
the sheet names are nicely listed in your msgbox although I am afraid to tell you that the msgbox still lists 'Sheet1'. ws.CodeName does not seem to work.
Martin: Great job. Works just fine. Thank you very much.
Regards, Andreas