M
mark
hello.
due to some network drive mapping changes, I may need to
come up with a way to access a significant list of files,
and search all through them, replacing any and all
instance of a drive mapping of "i:\"
to "h:\something\othersomething\"
I can do that easy enough for the contents of the cells in
all sheets, in all files... have that working fine.
But, IF there are vb components that have it in there, I
will need to change that too.
I have looked at Chip Pearson's 'Programming to the VBE',
and have some idea how to get at the code modules, sheet
code, userforms, and class modules (though I really doubt
there are any of them in these files. Nicely done, thank
you very much, Chip.
So now I'm at the point of cycling through the
vbComponents, like this:
**************
For i = 1 To wbFileToChange.VBProject.VBComponents.Count
Step 1
MsgBox wbFileToChange.VBProject.VBComponents(i).Name
Next i
************
(I am pretty sure that that access all components... will
do the form code, the code modules, the sheet code, all in
that loop... I just put that msgbox line in there to see
what I was getting).
In the worksheet contents, I used the cells.replace method
to look for and replace stuff.
What I need to know is what I can put in where the MsgBox
is above, which will search and replace the contents of
the vbCompents.
Suggestions?
Thanks.
Mark
due to some network drive mapping changes, I may need to
come up with a way to access a significant list of files,
and search all through them, replacing any and all
instance of a drive mapping of "i:\"
to "h:\something\othersomething\"
I can do that easy enough for the contents of the cells in
all sheets, in all files... have that working fine.
But, IF there are vb components that have it in there, I
will need to change that too.
I have looked at Chip Pearson's 'Programming to the VBE',
and have some idea how to get at the code modules, sheet
code, userforms, and class modules (though I really doubt
there are any of them in these files. Nicely done, thank
you very much, Chip.
So now I'm at the point of cycling through the
vbComponents, like this:
**************
For i = 1 To wbFileToChange.VBProject.VBComponents.Count
Step 1
MsgBox wbFileToChange.VBProject.VBComponents(i).Name
Next i
************
(I am pretty sure that that access all components... will
do the form code, the code modules, the sheet code, all in
that loop... I just put that msgbox line in there to see
what I was getting).
In the worksheet contents, I used the cells.replace method
to look for and replace stuff.
What I need to know is what I can put in where the MsgBox
is above, which will search and replace the contents of
the vbCompents.
Suggestions?
Thanks.
Mark