+ Reply to Thread
Results 1 to 6 of 6

disable exe file

  1. #1
    Registered User
    Join Date
    11-01-2006
    Posts
    6

    disable exe file

    i have a picture in excel that links to an exe file in windows ( eg. winword.exe)
    when i click on the picture, the warning that " you are launching an exe file " comes out. does anyone knows how to disable it ? or can i use a recorded macro to disable it.

    thanks

  2. #2
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500
    are you only trying to open word?

    if so open VBE by pressing Alt+F11 or tools>macros>visual basic editor

    then create a module in your workbook then copy and paste this

    Sub Openwrd()

    Application.ActivateMicrosoftApp xlMicrosoftWord

    End Sub

    then right click on your picture click on assign macro and then click on the macro Openwrd then test it

    should open word without giving you a message.

    you can open other office programs by replacing XlMicrosoftWord with either of these examples xlMicrosoftPowerPoint, xlMicrosoftMail, xlMicrosoftAccess, xlMicrosoftFoxPro, xlMicrosoftProject, or xlMicrosoftSchedulePlus.

  3. #3
    Registered User
    Join Date
    11-01-2006
    Posts
    6
    thanks a lot for your help
    it really worked !

    yes, i want to open office based applications
    btw. what is the code for opening excel ? xlmicrosoftexcel opens the calculator~!


    however, i also want to open custom exe file

    any solutions for that ?

    once again, thx a billion
    Last edited by tearskye; 11-02-2006 at 05:09 AM.

  4. #4
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500
    how are you opening your custom exe files? if you are using a macro could you post the code up here?

  5. #5
    Registered User
    Join Date
    11-01-2006
    Posts
    6
    i am opening macros either using the hyperlink function ( browse to file ) in excel

    or if there is any alternative that u can propose.

    thanks

  6. #6
    Forum Contributor funkymonkUK's Avatar
    Join Date
    01-07-2005
    Location
    London, England
    Posts
    500
    try using this macro

    Sub test()

    ' Specifying 1 as the second argument opens the application in
    ' normal size and gives it the focus.
    Dim RetVal
    RetVal = Shell("C:\WINNT\SYSTEM32\calc.exe", 1) ' Run Calculator.


    End Sub

    change the part that has the file structure and filename to the file you want to open. use the help function and search for "Shell Function" you can replace the 1 with customerize the window

+ Reply to 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