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

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Macro to open a 2nd Excel Session (Excel 2002)

    Author
    Topic
    #448164

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1095122

      You cannot record a macro of that. You’ll have to write the code. Jan Karel gave you an idea in post 691,543. 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.

      • #1095130

        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

    Viewing 0 reply threads
    Reply To: Macro to open a 2nd Excel Session (Excel 2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: