Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all
I am writing some code that loops through multiple Excel workbooks (may be open or not) and I am wondering if there's an Application or VBProject property that I can access that indicates that a given workbook has code in it. It seems logical that there is such a property, as a workbook with code prompts the user that macros are present. Is this property available through VBA? And if so, how? Thanks in advance Paul Martin Melbourne, Australia |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
See the recent thread in this NG "Need to scan xls files and identify if they use macros...wanna use VB". NickHK "Paul Martin" wrote in message oups.com... Hi all I am writing some code that loops through multiple Excel workbooks (may be open or not) and I am wondering if there's an Application or VBProject property that I can access that indicates that a given workbook has code in it. It seems logical that there is such a property, as a workbook with code prompts the user that macros are present. Is this property available through VBA? And if so, how? Thanks in advance Paul Martin Melbourne, Australia |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for pointing me to that post, Nick. I'm not sure if it helps
me, because I'm trying to find a relatively easy solution. Rather than scanning all the modules, I was thinking there must be a byte or something that Excel reads when opening a file to test whether macros exist. Is there an API or something that can enable me to do such a test? Regards Paul NickHK wrote: Paul, See the recent thread in this NG "Need to scan xls files and identify if they use macros...wanna use VB". NickHK "Paul Martin" wrote in message oups.com... Hi all I am writing some code that loops through multiple Excel workbooks (may be open or not) and I am wondering if there's an Application or VBProject property that I can access that indicates that a given workbook has code in it. It seems logical that there is such a property, as a workbook with code prompts the user that macros are present. Is this property available through VBA? And if so, how? Thanks in advance Paul Martin Melbourne, Australia |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
Unless you read through the Excel file format and understand where such VBA records are, you are stuck with the suggestions in that thread. Anyone else can come up with a different approach.... NickHK "Paul Martin" wrote in message oups.com... Thanks for pointing me to that post, Nick. I'm not sure if it helps me, because I'm trying to find a relatively easy solution. Rather than scanning all the modules, I was thinking there must be a byte or something that Excel reads when opening a file to test whether macros exist. Is there an API or something that can enable me to do such a test? Regards Paul NickHK wrote: Paul, See the recent thread in this NG "Need to scan xls files and identify if they use macros...wanna use VB". NickHK "Paul Martin" wrote in message oups.com... Hi all I am writing some code that loops through multiple Excel workbooks (may be open or not) and I am wondering if there's an Application or VBProject property that I can access that indicates that a given workbook has code in it. It seems logical that there is such a property, as a workbook with code prompts the user that macros are present. Is this property available through VBA? And if so, how? Thanks in advance Paul Martin Melbourne, Australia |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Nick
I'm not sure I understand your reply. Are you referring to reading the Open Source PDF? Regards Paul NickHK wrote: Paul, Unless you read through the Excel file format and understand where such VBA records are, you are stuck with the suggestions in that thread. Anyone else can come up with a different approach.... NickHK |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
Yes. If you want to test a couple of bytes for the presence of VBA code, you'll need to understand how Excel reads/writes such information in its format. Good luck. NickHK "Paul Martin" wrote in message ups.com... Hi Nick I'm not sure I understand your reply. Are you referring to reading the Open Source PDF? Regards Paul NickHK wrote: Paul, Unless you read through the Excel file format and understand where such VBA records are, you are stuck with the suggestions in that thread. Anyone else can come up with a different approach.... NickHK |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Test if file exists | Excel Discussion (Misc queries) | |||
How can I programmatically check in Excel 2002 if a sheet exists? | Excel Programming | |||
How to test if a DLL (library) exists | Excel Programming | |||
How to test if an Excel spreadsheet exists in VBScript? | Excel Programming | |||
Excel VBA - How do I programmatically change source code in another file? | Excel Programming |