Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a client with a number of workbooks, which were generated from a
template. The template has been through a number of revisions. For simplicity's sake, v1 did not have a given macro XXXX in, v2 did, and v3 (and subsequent versions) did not. Is there a way to identify whether a given workbook contains the macro XXXX (but without running the macro) programmatically, so that those workbooks can be backed up, and manually modified? The presence of the macro actually tells us that some other VBA code in the document is incorrect and will need updating, nothing more sinister, and while I am familiar with 'standard' VBA stuff and automation in general (I also design and code in C++, including COM servers and clients), I know little about the internal structure of workbooks (since I've never needed to, that's what automation is for...), so I'd appreciate any pointers. I estimate that in total there are around 4500 documents to check, and unfortunately, most have been updated on a regular basis, so datestamps don't help (although some can be eliminated by creation time). Thanks in advance -- Steve S |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can get a head start at Chip Pearson's site
http://www.cpearson.com/excel/vbe.htm -- Regards, Tom Ogilvy "SteveS" wrote: I have a client with a number of workbooks, which were generated from a template. The template has been through a number of revisions. For simplicity's sake, v1 did not have a given macro XXXX in, v2 did, and v3 (and subsequent versions) did not. Is there a way to identify whether a given workbook contains the macro XXXX (but without running the macro) programmatically, so that those workbooks can be backed up, and manually modified? The presence of the macro actually tells us that some other VBA code in the document is incorrect and will need updating, nothing more sinister, and while I am familiar with 'standard' VBA stuff and automation in general (I also design and code in C++, including COM servers and clients), I know little about the internal structure of workbooks (since I've never needed to, that's what automation is for...), so I'd appreciate any pointers. I estimate that in total there are around 4500 documents to check, and unfortunately, most have been updated on a regular basis, so datestamps don't help (although some can be eliminated by creation time). Thanks in advance -- Steve S |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Tom Ogilvy" wrote:
You can get a head start at Chip Pearson's site http://www.cpearson.com/excel/vbe.htm Thanks, Tom, that's just the thing. I've 'converted' the relevant bits to a C++ app that queries the GIT to make sure office apps aren't running, tweaks the registry while it loads up excel, does it's stuff, then restores the security settings, and it seems to be working ! Steve S |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Steve,
Thanks for your knowledage sharing and Tom's contribution in the community. Anyway if you still have any concern about this issue, please feel free to let me know and I am happy to be of assistance. Thanks! Best regards, Peter Huang Microsoft Online Community Support ================================================== When responding to posts, please "Reply to Group" via your newsreader so that others may learn and benefit from your issue. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Steve,
Just looking at a workbook in a text editor, I can see the name of a custom function. As long as the routine names are unique, a scan of the text would show up. NickHK "SteveS" wrote in message ... I have a client with a number of workbooks, which were generated from a template. The template has been through a number of revisions. For simplicity's sake, v1 did not have a given macro XXXX in, v2 did, and v3 (and subsequent versions) did not. Is there a way to identify whether a given workbook contains the macro XXXX (but without running the macro) programmatically, so that those workbooks can be backed up, and manually modified? The presence of the macro actually tells us that some other VBA code in the document is incorrect and will need updating, nothing more sinister, and while I am familiar with 'standard' VBA stuff and automation in general (I also design and code in C++, including COM servers and clients), I know little about the internal structure of workbooks (since I've never needed to, that's what automation is for...), so I'd appreciate any pointers. I estimate that in total there are around 4500 documents to check, and unfortunately, most have been updated on a regular basis, so datestamps don't help (although some can be eliminated by creation time). Thanks in advance -- Steve S |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"NickHK" wrote:
Steve, Just looking at a workbook in a text editor, I can see the name of a custom function. As long as the routine names are unique, a scan of the text would show up. NickHK Thanks. I'd looked at that but rejected it, as I need to be more accurate than that really. As it turns out, the advice given by Tom enables me to perform the whole job. I run a scan of the XLS files first, and back them up, and then apply the edits, so I'm quite pleased with that; I just send my client an EXE and it's all done as far as they are concerned. I really need to spend less time with a C++ development system and more examining the Office stuff! Steve S |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Not detecting Open Workbook - Why | Excel Discussion (Misc queries) | |||
macro to delete all named ranges in a workbook en masse? | Excel Discussion (Misc queries) | |||
Detecting if workbook running in IE or in Excel | Excel Programming | |||
Detecting a another workbook has opended | Excel Programming | |||
Detecting workbook activation | Excel Programming |