Skullmonkey
Computer
- Dec 10, 2001
- 12
I'm working on scripting an small VBA project for Excel2000 that will graph preknown data points from a dynamic amount of data sheets. Since the data sheets will be entered by the end-user in an unknown order, the code must retrieve the name of the worksheet for use as a title for the data in the Chart Legend.
Q: How can I get the name of the worksheet from Excel?
Also, can anyone think of a good method for keeping track of the sheet nums or names? To clarify: if the end-user fumbles with a worksheet and deletes it instead of clearing it and re-entering data, the worksheets may now be numbered Sheet1, Sheet2, Sheet4, etc. A For-loop built on a counter would not work in this case. At least, not that I have been able to ration.
Thanks for any help someone can lend.
SM
Q: How can I get the name of the worksheet from Excel?
Also, can anyone think of a good method for keeping track of the sheet nums or names? To clarify: if the end-user fumbles with a worksheet and deletes it instead of clearing it and re-entering data, the worksheets may now be numbered Sheet1, Sheet2, Sheet4, etc. A For-loop built on a counter would not work in this case. At least, not that I have been able to ration.
Thanks for any help someone can lend.
SM