Thanks! One more question, workbooks B & C I don't want to save but D I do.
How would I write that?
Thanks again!
Chris
"Per Jessen" wrote:
> Hi Chris
>
> Look at this:
>
> Set wbB = Workbooks.Open(Filename:="Book1.xls") ' Open "B"
> 'Your code
> 'More code
> wbB.Close ' Close "B"
>
> Hopes it helps
>
> Best regards,
> Per
> "ChrisP" <(E-Mail Removed)> skrev i meddelelsen
> news:535435A2-EE7C-4667-8935-(E-Mail Removed)...
> > I've written some VBA code to open one workbook (call it "A") and in the
> > open
> > event for workbook A I have it coded to open various other workbooks ("B",
> > "C", "D", etc).
> >
> > I'm doing it this way so all the links are updated (one is password
> > protected and I can't give out the password so I've had to code opening
> > them
> > in VBA and lock the VBA code).
> >
> > I have everything I need except how to close workbooks B, C, D, etc. I
> > don't
> > want to close all the workbooks as users may have other excel workbooks
> > open
> > at the time. Any help is appreciated!
> >
> > Thanks,
> > Chris
>
>
|