davesyd1970
10-10-2010, 02:04 PM
Hi.
Background:
I am designing a menu which will allow users to navigate to an excel workbook (windows explorer dialog). Once a workbook is selected, I need to display all the worksheets in the workbook. These selections will be stored in a database. Assume that the menu will be in an Access database.
I don't really want to open the Excel workbook in the background to get a list of worksheets, as these workbooks have a number of VBA routines which get run using the workbook Open event. I could potentially play with the workbook security settings before opening it to disable macros running when loading a new workbook.
The question is does anyone have a clever solution on this. I tried investigating DDE to see whether this might give me the functionality but could not find the code I needed. Ideally, there is a simple way to get a list of worksheets in a workbook without having to open up the workbook(and a list of range names in those worksheets would be a bonus).
Thanks for reading this.
David
Background:
I am designing a menu which will allow users to navigate to an excel workbook (windows explorer dialog). Once a workbook is selected, I need to display all the worksheets in the workbook. These selections will be stored in a database. Assume that the menu will be in an Access database.
I don't really want to open the Excel workbook in the background to get a list of worksheets, as these workbooks have a number of VBA routines which get run using the workbook Open event. I could potentially play with the workbook security settings before opening it to disable macros running when loading a new workbook.
The question is does anyone have a clever solution on this. I tried investigating DDE to see whether this might give me the functionality but could not find the code I needed. Ideally, there is a simple way to get a list of worksheets in a workbook without having to open up the workbook(and a list of range names in those worksheets would be a bonus).
Thanks for reading this.
David