Does workbook contain code

P

Paul Christie

Does anyone know of a way of finding out if a workbook
has a code module without opening the workbook.

I'm writing an import process into an Access Database and
I need to check the file before I open it.

Thanks for any help.
 
C

Chip Pearson

Unfortunately, the DSOleFile.PropertyReader property HasMacros
always returns true for Excel workbooks. The only way to
determine whether a workbook has macros is to open it up and
examine the code. This can be done programmatically, but the
workbook does have to be opened.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 

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

Top