Closed Thread
Results 1 to 19 of 19

How do i open a new instance Excel?

  1. #1
    Michael D. Reed
    Guest

    How do i open a new instance Excel?

    How do I open excel workbook in its own instance of Excel. When I have Excel
    running and open another Excel workbook file (with an .xls extension) it is
    opened in the instance I have running. So, when I exit Excel both workbooks
    are closed. This is a problem when for a program that has a hidden Excel
    workbook running. If I start another Excel file, it uses the instance of
    Excel the program is using. This causes a problem for the program because I
    shows the hidden file and will close it if the instance is closed. If I open
    an instance of Excel then load the file, I get new instance of Excel. Is
    there a way to tell the system to open a new Excel file in a new instance?
    --
    Mike Reed

  2. #2
    Fred
    Guest

    Re: How do i open a new instance Excel?

    Micheal try,

    Dim xlApp as Excel.Application
    set xlApp = CreateObject("Excel.Application")
    xlApp.Visible = True
    xlApp.Workbooks.Open FileName:="C:\Book1.xls"


    Fred

    "Michael D. Reed" <[email protected]> wrote in message
    news:[email protected]...
    > How do I open excel workbook in its own instance of Excel. When I have
    > Excel
    > running and open another Excel workbook file (with an .xls extension) it
    > is
    > opened in the instance I have running. So, when I exit Excel both
    > workbooks
    > are closed. This is a problem when for a program that has a hidden Excel
    > workbook running. If I start another Excel file, it uses the instance of
    > Excel the program is using. This causes a problem for the program because
    > I
    > shows the hidden file and will close it if the instance is closed. If I
    > open
    > an instance of Excel then load the file, I get new instance of Excel. Is
    > there a way to tell the system to open a new Excel file in a new instance?
    > --
    > Mike Reed




  3. #3
    William Benson
    Guest

    Re: How do i open a new instance Excel?

    Any idea why this opens an instance without the message that certain
    workbooks are already locked for editing (e.g., Personal.XLS)?

    (typically a
    "Fred" <leavemealone@home> wrote in message
    news:[email protected]...
    > Micheal try,
    >
    > Dim xlApp as Excel.Application
    > set xlApp = CreateObject("Excel.Application")
    > xlApp.Visible = True
    > xlApp.Workbooks.Open FileName:="C:\Book1.xls"
    >
    >
    > Fred
    >
    > "Michael D. Reed" <[email protected]> wrote in message
    > news:[email protected]...
    >> How do I open excel workbook in its own instance of Excel. When I have
    >> Excel
    >> running and open another Excel workbook file (with an .xls extension) it
    >> is
    >> opened in the instance I have running. So, when I exit Excel both
    >> workbooks
    >> are closed. This is a problem when for a program that has a hidden Excel
    >> workbook running. If I start another Excel file, it uses the instance of
    >> Excel the program is using. This causes a problem for the program
    >> because I
    >> shows the hidden file and will close it if the instance is closed. If I
    >> open
    >> an instance of Excel then load the file, I get new instance of Excel. Is
    >> there a way to tell the system to open a new Excel file in a new
    >> instance?
    >> --
    >> Mike Reed

    >
    >




  4. #4
    Norman Jones
    Guest

    Re: How do i open a new instance Excel?

    "William Benson" <[email protected]> wrote in message
    news:[email protected]...
    > Any idea why this opens an instance without the message that certain
    > workbooks are already locked for editing (e.g., Personal.XLS)?



    The code ONLY loads the designated workbook (Book1.xls). AddIns and files in
    the XLStart folder, such as Personal.xls, do not get loaded.Consequently,
    the question of locked files does not arise.

    Hit Alt-F11 and look at the files in the VBE.

    ---
    Regards,
    Norman



  5. #5
    Norman Jones
    Guest

    Re: How do i open a new instance Excel?

    Hi William,

    See also MSKB 213489:
    Add-Ins Don't Load When Using the CreateObject Command

    http://support.microsoft.com/default...b;en-us;213489

    ---
    Regards,
    Norman



    "Norman Jones" <[email protected]> wrote in message
    news:[email protected]...
    > "William Benson" <[email protected]> wrote in message
    > news:[email protected]...
    >> Any idea why this opens an instance without the message that certain
    >> workbooks are already locked for editing (e.g., Personal.XLS)?

    >
    >
    > The code ONLY loads the designated workbook (Book1.xls). AddIns and files
    > in the XLStart folder, such as Personal.xls, do not get
    > loaded.Consequently, the question of locked files does not arise.
    >
    > Hit Alt-F11 and look at the files in the VBE.
    >
    > ---
    > Regards,
    > Norman
    >




  6. #6
    William Benson
    Guest

    Re: How do i open a new instance Excel?

    I see. As an interesting side note, but in keeping with my original question
    (you answered why Personal doesn't open, but missed the heart of my concern)
    it opens any unopen file without warnings about read-only (or macros, for
    that matter). In fact, if the calling procedure is from a file with macros
    enabled, you will not be asked if you want the called file to be opened with
    or without macros.

    This produced an interesting (please don't try this with any other apps
    running and I suggest saving all your work cuz ya gonna need to shut down
    the HARD WAY) effect: I put Fred's code into the Workbook_Open sub of the
    file Book1 on C: and it called itself recursively when opened ... I was
    given only one chance to say Yes/No to macros, then BOOM.

    I repeat, I wouldn't try it.

    And I have learned NEVER EVER EVER say Yes to macros the first time you open
    a file ... and be sure to look at ALL the code before you ever try it WITH
    macros enabled.

    Thanks,

    Bill

    "Norman Jones" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi William,
    >
    > See also MSKB 213489:
    > Add-Ins Don't Load When Using the CreateObject Command
    >
    > http://support.microsoft.com/default...b;en-us;213489
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Norman Jones" <[email protected]> wrote in message
    > news:[email protected]...
    >> "William Benson" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Any idea why this opens an instance without the message that certain
    >>> workbooks are already locked for editing (e.g., Personal.XLS)?

    >>
    >>
    >> The code ONLY loads the designated workbook (Book1.xls). AddIns and files
    >> in the XLStart folder, such as Personal.xls, do not get
    >> loaded.Consequently, the question of locked files does not arise.
    >>
    >> Hit Alt-F11 and look at the files in the VBE.
    >>
    >> ---
    >> Regards,
    >> Norman
    >>

    >
    >




  7. #7
    William Benson
    Guest

    Re: How do i open a new instance Excel?

    It obviously opens unopen files without warnings about read-only, but what I
    meant to write is it ALSO opens ALREADY OPENED files without read-only
    warnings, in the new instances of Excel...

    "William Benson" <[email protected]> wrote in message
    news:%[email protected]...
    >I see. As an interesting side note, but in keeping with my original
    >question (you answered why Personal doesn't open, but missed the heart of
    >my concern) it opens any unopen file without warnings about read-only (or
    >macros, for that matter). In fact, if the calling procedure is from a file
    >with macros enabled, you will not be asked if you want the called file to
    >be opened with or without macros.
    >
    > This produced an interesting (please don't try this with any other apps
    > running and I suggest saving all your work cuz ya gonna need to shut down
    > the HARD WAY) effect: I put Fred's code into the Workbook_Open sub of the
    > file Book1 on C: and it called itself recursively when opened ... I was
    > given only one chance to say Yes/No to macros, then BOOM.
    >
    > I repeat, I wouldn't try it.
    >
    > And I have learned NEVER EVER EVER say Yes to macros the first time you
    > open a file ... and be sure to look at ALL the code before you ever try it
    > WITH macros enabled.
    >
    > Thanks,
    >
    > Bill
    >
    > "Norman Jones" <[email protected]> wrote in message
    > news:%[email protected]...
    >> Hi William,
    >>
    >> See also MSKB 213489:
    >> Add-Ins Don't Load When Using the CreateObject Command
    >>
    >> http://support.microsoft.com/default...b;en-us;213489
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>
    >>
    >> "Norman Jones" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> "William Benson" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> Any idea why this opens an instance without the message that certain
    >>>> workbooks are already locked for editing (e.g., Personal.XLS)?
    >>>
    >>>
    >>> The code ONLY loads the designated workbook (Book1.xls). AddIns and
    >>> files in the XLStart folder, such as Personal.xls, do not get
    >>> loaded.Consequently, the question of locked files does not arise.
    >>>
    >>> Hit Alt-F11 and look at the files in the VBE.
    >>>
    >>> ---
    >>> Regards,
    >>> Norman
    >>>

    >>
    >>

    >
    >




  8. #8
    Tushar Mehta
    Guest

    Re: How do i open a new instance Excel?

    This addresses only the part about macro warnings. That lack of
    warning is by design (and configurable). When code opens a workbook
    containing macros, it is subject to the AutomationSecurity property.
    The default value of that property is msoAutomationSecurityLow.

    My guess is that MS decided that if you trust the code that is
    currently running, you trust any code that it, the currently executing
    code, chooses to invoke.

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <#[email protected]>, wbenson1
    @nycap.rr.com says...
    > I see. As an interesting side note, but in keeping with my original question
    > (you answered why Personal doesn't open, but missed the heart of my concern)
    > it opens any unopen file without warnings about read-only (or macros, for
    > that matter). In fact, if the calling procedure is from a file with macros
    > enabled, you will not be asked if you want the called file to be opened with
    > or without macros.
    >
    > This produced an interesting (please don't try this with any other apps
    > running and I suggest saving all your work cuz ya gonna need to shut down
    > the HARD WAY) effect: I put Fred's code into the Workbook_Open sub of the
    > file Book1 on C: and it called itself recursively when opened ... I was
    > given only one chance to say Yes/No to macros, then BOOM.
    >
    > I repeat, I wouldn't try it.
    >
    > And I have learned NEVER EVER EVER say Yes to macros the first time you open
    > a file ... and be sure to look at ALL the code before you ever try it WITH
    > macros enabled.
    >
    > Thanks,
    >
    > Bill
    >
    > "Norman Jones" <[email protected]> wrote in message
    > news:%[email protected]...
    > > Hi William,
    > >
    > > See also MSKB 213489:
    > > Add-Ins Don't Load When Using the CreateObject Command
    > >
    > > http://support.microsoft.com/default...b;en-us;213489
    > >
    > > ---
    > > Regards,
    > > Norman
    > >
    > >
    > >
    > > "Norman Jones" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> "William Benson" <[email protected]> wrote in message
    > >> news:[email protected]...
    > >>> Any idea why this opens an instance without the message that certain
    > >>> workbooks are already locked for editing (e.g., Personal.XLS)?
    > >>
    > >>
    > >> The code ONLY loads the designated workbook (Book1.xls). AddIns and files
    > >> in the XLStart folder, such as Personal.xls, do not get
    > >> loaded.Consequently, the question of locked files does not arise.
    > >>
    > >> Hit Alt-F11 and look at the files in the VBE.
    > >>
    > >> ---
    > >> Regards,
    > >> Norman
    > >>

    > >
    > >

    >
    >
    >


  9. #9
    Michael D. Reed
    Guest

    Re: How do i open a new instance Excel?

    Using create object did not work. I may be in the wrong group but this is
    what I am doing.
    I am opening an Excel workbook from a VB.NET program using:
    _myApplaction = New Excel.Application
    _myWorkbook = ._myApplaction.Workbooks.Open(ExcelWorkbookPath)
    I also tried
    _myApplaction = CreateObject("Excel.Application")

    _myWorkbook = ._myApplaction.Workbooks.Open(ExcelWorkbookPath)

    In both cases if I open a workbook file it uses the running Excel instance
    you can see this by looking at the Windows menu, both files are listed there.

    If I open Excel and then open the workbook, it is in a new instance in each
    instance the Windows menu will only show one workbook.
    Is there a way to tell excel to open a new instance when a workbook file is
    opened, preferably programmability.

    --
    Mike Reed


    "Fred" wrote:

    > Micheal try,
    >
    > Dim xlApp as Excel.Application
    > set xlApp = CreateObject("Excel.Application")
    > xlApp.Visible = True
    > xlApp.Workbooks.Open FileName:="C:\Book1.xls"
    >
    >
    > Fred
    >
    > "Michael D. Reed" <[email protected]> wrote in message
    > news:[email protected]...
    > > How do I open excel workbook in its own instance of Excel. When I have
    > > Excel
    > > running and open another Excel workbook file (with an .xls extension) it
    > > is
    > > opened in the instance I have running. So, when I exit Excel both
    > > workbooks
    > > are closed. This is a problem when for a program that has a hidden Excel
    > > workbook running. If I start another Excel file, it uses the instance of
    > > Excel the program is using. This causes a problem for the program because
    > > I
    > > shows the hidden file and will close it if the instance is closed. If I
    > > open
    > > an instance of Excel then load the file, I get new instance of Excel. Is
    > > there a way to tell the system to open a new Excel file in a new instance?
    > > --
    > > Mike Reed

    >
    >
    >


  10. #10
    Tushar Mehta
    Guest

    Re: How do i open a new instance Excel?

    Maybe, there is some option in XL that I have long since forgotten but
    if not using CreateObject is SOP for starting a new instance of XL.
    Another possibility is that .Net is doing something different.

    One way to narrow down the source of the problem would be to
    instantiate a new copy of XL from VB or from VBA running in another
    Office program or from VBA running in XL itself. If VB/A works fine
    then you can safely focus your attention on the .Net interface. If it
    doesn't there's something about that machine / copy of XL.

    One final note. You may want to ensure you have the latest support
    release for your version of XL.


    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>,
    [email protected]am says...
    > Using create object did not work. I may be in the wrong group but this is
    > what I am doing.
    > I am opening an Excel workbook from a VB.NET program using:
    > _myApplaction = New Excel.Application
    > _myWorkbook = ._myApplaction.Workbooks.Open(ExcelWorkbookPath)
    > I also tried
    > _myApplaction = CreateObject("Excel.Application")
    >
    > _myWorkbook = ._myApplaction.Workbooks.Open(ExcelWorkbookPath)
    >
    > In both cases if I open a workbook file it uses the running Excel instance
    > you can see this by looking at the Windows menu, both files are listed there.
    >
    > If I open Excel and then open the workbook, it is in a new instance in each
    > instance the Windows menu will only show one workbook.
    > Is there a way to tell excel to open a new instance when a workbook file is
    > opened, preferably programmability.
    >
    >


  11. #11
    Michael D. Reed
    Guest

    Re: How do i open a new instance Excel?

    It has something to do with how the XP launches a file associated with an
    exe. If I click on or choose, open form the context menu in the file
    explorer the workbook is loaded into the most recently launched instance of
    Excel or if I launch the file alone form the command line it is put into the
    most recently launched instance of Excel. If I launch Excel and then load
    the file I get a separate instance of Excel or if I launce excel from the
    command line with the file as a command line argument I get a second instance
    of excel.
    I know .NET launches a new instance of Excel because I can wind up with
    several running. I can verify this by the tasks manager. I will have
    several Excels running that I need to explicitly end them.
    A quick check of Word and Visio; Visio is similar Excel and Word is
    different. Word under the Windows menu you can see all the running documents
    but closing there window only closes the one document.

    --
    Mike Reed


    "Tushar Mehta" wrote:

    > Maybe, there is some option in XL that I have long since forgotten but
    > if not using CreateObject is SOP for starting a new instance of XL.
    > Another possibility is that .Net is doing something different.
    >
    > One way to narrow down the source of the problem would be to
    > instantiate a new copy of XL from VB or from VBA running in another
    > Office program or from VBA running in XL itself. If VB/A works fine
    > then you can safely focus your attention on the .Net interface. If it
    > doesn't there's something about that machine / copy of XL.
    >
    > One final note. You may want to ensure you have the latest support
    > release for your version of XL.
    >
    >
    > --
    > Regards,
    >
    > Tushar Mehta
    > www.tushar-mehta.com
    > Excel, PowerPoint, and VBA add-ins, tutorials
    > Custom MS Office productivity solutions
    >
    > In article <[email protected]>,
    > [email protected]am says...
    > > Using create object did not work. I may be in the wrong group but this is
    > > what I am doing.
    > > I am opening an Excel workbook from a VB.NET program using:
    > > _myApplaction = New Excel.Application
    > > _myWorkbook = ._myApplaction.Workbooks.Open(ExcelWorkbookPath)
    > > I also tried
    > > _myApplaction = CreateObject("Excel.Application")
    > >
    > > _myWorkbook = ._myApplaction.Workbooks.Open(ExcelWorkbookPath)
    > >
    > > In both cases if I open a workbook file it uses the running Excel instance
    > > you can see this by looking at the Windows menu, both files are listed there.
    > >
    > > If I open Excel and then open the workbook, it is in a new instance in each
    > > instance the Windows menu will only show one workbook.
    > > Is there a way to tell excel to open a new instance when a workbook file is
    > > opened, preferably programmability.
    > >
    > >

    >


  12. #12
    Tushar Mehta
    Guest

    Re: How do i open a new instance Excel?

    OK, now I am confused. All along I thought that .Net CreateObject was
    not instantiating a new copy of XL. But, in your latest post you
    indicate that you are. So, what problem are you are trying to resolve?

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>,
    [email protected]am says...
    > It has something to do with how the XP launches a file associated with an
    > exe. If I click on or choose, open form the context menu in the file
    > explorer the workbook is loaded into the most recently launched instance of
    > Excel or if I launch the file alone form the command line it is put into the
    > most recently launched instance of Excel. If I launch Excel and then load
    > the file I get a separate instance of Excel or if I launce excel from the
    > command line with the file as a command line argument I get a second instance
    > of excel.
    > I know .NET launches a new instance of Excel because I can wind up with
    > several running. I can verify this by the tasks manager. I will have
    > several Excels running that I need to explicitly end them.
    > A quick check of Word and Visio; Visio is similar Excel and Word is
    > different. Word under the Windows menu you can see all the running documents
    > but closing there window only closes the one document.
    >
    >


  13. #13
    Peter Huang [MSFT]
    Guest

    Re: How do i open a new instance Excel?

    Hi Mike,

    I agree with Tushar's suggestion.
    Can you so kind to describe your goal detailed?
    If you want to open the xls file in a new excel.exe instance, you may try
    to CreateObject and use the created instance to open the excel file.

    Best regards,

    Peter Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.


  14. #14
    Vic Eldridge
    Guest

    RE: How do i open a new instance Excel?

    > Is there a way to tell the system to open a new Excel file in a new instance?

    Yes. Application.IgnoreRemoteRequests = True


    Regards,
    Vic Eldridge




    "Michael D. Reed" wrote:

    > How do I open excel workbook in its own instance of Excel. When I have Excel
    > running and open another Excel workbook file (with an .xls extension) it is
    > opened in the instance I have running. So, when I exit Excel both workbooks
    > are closed. This is a problem when for a program that has a hidden Excel
    > workbook running. If I start another Excel file, it uses the instance of
    > Excel the program is using. This causes a problem for the program because I
    > shows the hidden file and will close it if the instance is closed. If I open
    > an instance of Excel then load the file, I get new instance of Excel. Is
    > there a way to tell the system to open a new Excel file in a new instance?
    > --
    > Mike Reed


  15. #15
    Michael D. Reed
    Guest

    RE: How do i open a new instance Excel?

    Vic
    That worked! How did you find that out? It not documented in the app
    object for Excel. Infect when I look for "IgnoreRemoteRequests" in help it
    did not show up. It looks like a hangover from the DDE days. I did not see
    it in the intelligence scene list until you pointed it out.
    Thank you,
    --
    Mike Reed


    "Vic Eldridge" wrote:

    > > Is there a way to tell the system to open a new Excel file in a new instance?

    >
    > Yes. Application.IgnoreRemoteRequests = True
    >
    >
    > Regards,
    > Vic Eldridge
    >
    >
    >
    >
    > "Michael D. Reed" wrote:
    >
    > > How do I open excel workbook in its own instance of Excel. When I have Excel
    > > running and open another Excel workbook file (with an .xls extension) it is
    > > opened in the instance I have running. So, when I exit Excel both workbooks
    > > are closed. This is a problem when for a program that has a hidden Excel
    > > workbook running. If I start another Excel file, it uses the instance of
    > > Excel the program is using. This causes a problem for the program because I
    > > shows the hidden file and will close it if the instance is closed. If I open
    > > an instance of Excel then load the file, I get new instance of Excel. Is
    > > there a way to tell the system to open a new Excel file in a new instance?
    > > --
    > > Mike Reed


  16. #16
    Peter Huang [MSFT]
    Guest

    RE: How do i open a new instance Excel?

    Hi

    This is included in the excel vba help file.
    <Program Files>\Microsoft Office\OFFICE11\1033\VBAXL10.CHM

    IgnoreRemoteRequests Property
    See AlsoApplies ToExampleSpecifics
    True if remote DDE requests are ignored. Read/write Boolean.

    Example
    This example sets the IgnoreRemoteRequests property to True so that remote
    DDE requests are ignored.

    Application.IgnoreRemoteRequests = True




    Best regards,

    Peter Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.


  17. #17
    Michael D. Reed
    Guest

    RE: How do i open a new instance Excel?

    Peter Thank you,
    Under the “no question is a dumb question department’ can one assume that
    the object model in VBA is reflected through to the .NET
    Microsoft.Office.Interop.Excel?
    --
    Mike Reed


    ""Peter Huang" [MSFT]" wrote:

    > Hi
    >
    > This is included in the excel vba help file.
    > <Program Files>\Microsoft Office\OFFICE11\1033\VBAXL10.CHM
    >
    > IgnoreRemoteRequests Property
    > See AlsoApplies ToExampleSpecifics
    > True if remote DDE requests are ignored. Read/write Boolean.
    >
    > Example
    > This example sets the IgnoreRemoteRequests property to True so that remote
    > DDE requests are ignored.
    >
    > Application.IgnoreRemoteRequests = True
    >
    >
    >
    >
    > Best regards,
    >
    > Peter Huang
    > Microsoft Online Partner Support
    >
    > Get Secure! - www.microsoft.com/security
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >


  18. #18
    Peter Huang [MSFT]
    Guest

    RE: How do i open a new instance Excel?

    Hi

    Yes.
    Acutally the Interop.Excel.dll is an .NET wrap for the Excel.EXE COM Object
    Modal.

    Best regards,

    Peter Huang
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security
    This posting is provided "AS IS" with no warranties, and confers no rights.


  19. #19
    William Benson
    Guest

    Re: How do i open a new instance Excel?

    Took me forever to get around to revisiting this thread ... but thanks for
    the heads up about AutomationSecurity.

    "Tushar Mehta" <[email protected]> wrote in message
    news:[email protected]...
    > This addresses only the part about macro warnings. That lack of
    > warning is by design (and configurable). When code opens a workbook
    > containing macros, it is subject to the AutomationSecurity property.
    > The default value of that property is msoAutomationSecurityLow.
    >
    > My guess is that MS decided that if you trust the code that is
    > currently running, you trust any code that it, the currently executing
    > code, chooses to invoke.
    >
    > --
    > Regards,
    >
    > Tushar Mehta
    > www.tushar-mehta.com
    > Excel, PowerPoint, and VBA add-ins, tutorials
    > Custom MS Office productivity solutions
    >
    > In article <#[email protected]>, wbenson1
    > @nycap.rr.com says...
    >> I see. As an interesting side note, but in keeping with my original
    >> question
    >> (you answered why Personal doesn't open, but missed the heart of my
    >> concern)
    >> it opens any unopen file without warnings about read-only (or macros, for
    >> that matter). In fact, if the calling procedure is from a file with
    >> macros
    >> enabled, you will not be asked if you want the called file to be opened
    >> with
    >> or without macros.
    >>
    >> This produced an interesting (please don't try this with any other apps
    >> running and I suggest saving all your work cuz ya gonna need to shut down
    >> the HARD WAY) effect: I put Fred's code into the Workbook_Open sub of
    >> the
    >> file Book1 on C: and it called itself recursively when opened ... I was
    >> given only one chance to say Yes/No to macros, then BOOM.
    >>
    >> I repeat, I wouldn't try it.
    >>
    >> And I have learned NEVER EVER EVER say Yes to macros the first time you
    >> open
    >> a file ... and be sure to look at ALL the code before you ever try it
    >> WITH
    >> macros enabled.
    >>
    >> Thanks,
    >>
    >> Bill
    >>
    >> "Norman Jones" <[email protected]> wrote in message
    >> news:%[email protected]...
    >> > Hi William,
    >> >
    >> > See also MSKB 213489:
    >> > Add-Ins Don't Load When Using the CreateObject Command
    >> >
    >> > http://support.microsoft.com/default...b;en-us;213489
    >> >
    >> > ---
    >> > Regards,
    >> > Norman
    >> >
    >> >
    >> >
    >> > "Norman Jones" <[email protected]> wrote in message
    >> > news:[email protected]...
    >> >> "William Benson" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >>> Any idea why this opens an instance without the message that certain
    >> >>> workbooks are already locked for editing (e.g., Personal.XLS)?
    >> >>
    >> >>
    >> >> The code ONLY loads the designated workbook (Book1.xls). AddIns and
    >> >> files
    >> >> in the XLStart folder, such as Personal.xls, do not get
    >> >> loaded.Consequently, the question of locked files does not arise.
    >> >>
    >> >> Hit Alt-F11 and look at the files in the VBE.
    >> >>
    >> >> ---
    >> >> Regards,
    >> >> Norman
    >> >>
    >> >
    >> >

    >>
    >>
    >>




Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1