Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open and application using a button on a form (97 sr2)

    I am trying to open an application that is not Microsoft using either the Shell statement or the AppActivate statement. The application beings to open but does not fully execute. When using the AppActivate statement the halt screen comes up, when using the shell statement it just stops. The application I am trying to open is 1.4 mg, could that be the problem?

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

    Re: Open and application using a button on a form (97 sr2)

    AppActivate is used to activate an application that has already been started (for example using Shell), you can't start an application with AppActivate.

    Program size should not really be a problem with Shell. Can you post the Shell instruction you have now?

  3. #3
    2 Star Lounger
    Join Date
    Sep 2007
    Location
    Chatham, Kent, England
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open and application using a button on a form (97 sr2)

    Can you use the runapp action in a macro?

    Regards

    Graeme

  4. #4
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open and application using a button on a form (97 sr2)

    This is the shell function I used:

    Private Sub txtOpenMunex_Click()
    Dim RetVal
    RetVal = Shell("C:munexwmunex.EXE", 1) ' Run Munex.

    End Sub

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

    Re: Open and application using a button on a form (97 sr2)

    Thanks. Insert an extra statement as follows:

    Private Sub txtOpenMunex_Click()
    Dim RetVal
    RetVal = Shell("C:munexwmunex.EXE", 1) ' Run Munex.
    MsgBox "RetVal = " & RetVal
    End Sub

    If you get a message box saying that RetVal = 0, Shell didn't succeed in opening the application.
    If you get a message box saying that RetVal is some non-zero value, the application was at least started.

    Can you report back what you get?

  6. #6
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open and application using a button on a form (97 sr2)

    The opening screen for the applications blinks on and then off very quickly
    return value = -82741297

    thanks

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

    Re: Open and application using a button on a form (97 sr2)

    Since Shell returns a non-zero value, the app is started, apparently.

    Perhaps earlier failed attempts have left copies of the app in memory; this might interfere with normal operation. To be on the safe side, I would restart the computer.

    Also, replace the second parameter 1 in your Shell command by vbMaximizedFocus; this should start the application maximized. This rules out the possibility that the app is started somewhere off-screen.

  8. #8
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open and application using a button on a form (97 sr2)

    no luck

    it gives me the front screen a little longer but the application does not open.

  9. #9
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open and application using a button on a form (97 sr2)

    <P ID="nt"><font size=-1>(No Text)</font>

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

    Re: Open and application using a button on a form (97 sr2)

    <img src=/S/question.gif border=0 alt=question width=15 height=15>

  11. #11
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open and application using a button on a form (97 sr2)

    it gives me the front screen a little longer but the application does not open.

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

    Re: Open and application using a button on a form (97 sr2)

    I'm sorry, I don't have any more ideas. It seems that at least part of the application starts, since you see its first screen. I have no idea why the main screen of the application doesn't appear.

    I do not have or know Munex.exe. Perhaps there are Loungers who do have or know it; let's hope one of them reacts.

  13. #13
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Open and application using a button on a form (97 sr2)

    Try adding the line

    AppActivate RetVal

    after the line shelling to the app.
    Charlotte

  14. #14
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Open and application using a button on a form (97 sr2)

    Hi Cathy,
    Just to check that the program is working and also that it doesn't require any startup parameters, if you browse to the munex.exe file via Explorer and double-click it, does it run ok?
    Regards,
    Rory

    Microsoft MVP - Excel

  15. #15
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    New Jersey, USA
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open and application using a button on a form (97 sr2)

    Thanks for all your help

Page 1 of 2 12 LastLast

Posting Permissions

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