Seeking VBA equivalent of launching MSPAINT c:\image.bmp with XP's START button

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MLH

    #1

    Seeking VBA equivalent of launching MSPAINT c:\image.bmp with XP's START button

    What's the best way to launch MSPAINT c:\image.bmp
    from a VBA procedure. Seeking the route with the least
    number of complications. Hopefully there will be no more
    complications than if I clicked START and typed in the
    command myself.
  • fredg

    #2
    Re: Seeking VBA equivalent of launching MSPAINT c:\image.bmp with XP's START button

    On Sun, 17 Feb 2008 18:56:44 -0500, MLH wrote:
    What's the best way to launch MSPAINT c:\image.bmp
    from a VBA procedure. Seeking the route with the least
    number of complications. Hopefully there will be no more
    complications than if I clicked START and typed in the
    command myself.
    Are your .bmp file types set up to open in Paint?
    Simplest for me is:

    Application.Fol lowHyperlink "c:\Foldername\ ImageName.bmp"

    --
    Fred
    Please respond only to this newsgroup.
    I do not reply to personal e-mail

    Comment

    • Dominic Vella

      #3
      Re: Seeking VBA equivalent of launching MSPAINT c:\image.bmp with XP's START button


      ' Specifying 1 as the second argument opens the application in
      ' normal size and gives it the focus.
      Dim RetVal
      RetVal = Shell("c:\windo ws\system32\msp aint.exe", 1) ' Run MSPaint.


      "MLH" <CRCI@NorthStat e.netwrote in message
      news:r7ihr3pd6s 5sgh12n1i7qvjlm g1fqn56tg@4ax.c om...
      What's the best way to launch MSPAINT c:\image.bmp
      from a VBA procedure. Seeking the route with the least
      number of complications. Hopefully there will be no more
      complications than if I clicked START and typed in the
      command myself.

      Comment

      • MLH

        #4
        Re: Seeking VBA equivalent of launching MSPAINT c:\image.bmp with XP's START button

        Putting it in click event did the trick nicely.
        Thx.

        Comment

        Working...