Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Ankeny, Iowa, USA
    Posts
    344
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Macro to open a 2nd Excel Session (Excel 2002)

    Hi,
    I'm wondering if someone could please tell me what would be the proper code to put into my macro to open a 2nd Excel "session". I tried to record a macro to open the 2nd session, but it didn't work. Also, when I open a 2nd Excel session manually (which I almost would never need to do, but in this case the need is necessary), I get a message box telling me "file in use" in regards to my personal.xls file that automatically opens when I open an Excel session (I always click on "read only"), and I'd like for it to NOT open when this 2nd Excel session opens, or to automatically select the read only option. As always... any help is much appreciated!
    Thanks!
    Lana

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro to open a 2nd Excel Session (Excel 2002)

    You cannot record a macro of that. You'll have to write the code. Jan Karel gave you an idea in <post:=691,543>post 691,543</post:>. If you open a second instance of Excel that way, you don't get a prompt about Personal.xls.

    Be careful - the kind of code you're about to write is quite difficult, and can cause problems if you make mistakes. Please make a backup copy of your workbook each time before trying out the code.
    You may end up with hidden instances of Excel remaining in memory. You can kill those using the Processes tab of the Task Manager.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Ankeny, Iowa, USA
    Posts
    344
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Macro to open a 2nd Excel Session (Excel 2002)

    Yep, I wondered if Jan's code was opening a 2nd session... I'm showing how green I really am, as I didn't understand it. You can probably tell by my code that I'm more familiar with code that deals with moving stuff around in Excel, as opposed to actual programming code. So I understand what Jan wrote, could someone please explain what each line means (especially the part on where in the the code it says to go out and open the 2nd session). I'll take care to heed Hans warning, as I know I'm quite the rookie... I may need to just live with the fact that my macro may run slow for this project... macros have spoiled me, as I love the completion of tasks in the speed of light for everything and everyone!
    Thanks!
    Lana

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to open a 2nd Excel Session (Excel 2002)

    I've answered this in the original thread.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

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