+ Reply to Thread
Results 1 to 5 of 5

Shell command

  1. #1
    Viktor Ygdorff
    Guest

    Shell command

    VBA has a Shell command that can open certain programs like this:

    RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator

    Is it possible to open Bloomberg using this command?


  2. #2
    Andrew Taylor
    Guest

    re: Shell command

    If you mean you want to open the Bloomberg website, try this:
    (lines split to avpoid wrapping)

    Private Declare Function ShellExecute _
    Lib "shell32.dll" Alias "ShellExecuteA" _
    (ByVal hwnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long

    Sub OpenBloomberg()
    Dim RetVal As Long
    RetVal = ShellExecute(0&, "OPEN", _
    "http://www.bloomberg.com", "", 0&, 1)
    End Sub




    Viktor Ygdorff wrote:
    > VBA has a Shell command that can open certain programs like this:
    >
    > RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator
    >
    > Is it possible to open Bloomberg using this command?



  3. #3
    Viktor Ygdorff
    Guest

    re: Shell command

    Hello! Sorry I meant the Bloomberg program. Thanks anyway.

    "Andrew Taylor" skrev:

    > If you mean you want to open the Bloomberg website, try this:
    > (lines split to avpoid wrapping)
    >
    > Private Declare Function ShellExecute _
    > Lib "shell32.dll" Alias "ShellExecuteA" _
    > (ByVal hwnd As Long, _
    > ByVal lpOperation As String, _
    > ByVal lpFile As String, _
    > ByVal lpParameters As String, _
    > ByVal lpDirectory As String, _
    > ByVal nShowCmd As Long) As Long
    >
    > Sub OpenBloomberg()
    > Dim RetVal As Long
    > RetVal = ShellExecute(0&, "OPEN", _
    > "http://www.bloomberg.com", "", 0&, 1)
    > End Sub
    >
    >
    >
    >
    > Viktor Ygdorff wrote:
    > > VBA has a Shell command that can open certain programs like this:
    > >
    > > RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator
    > >
    > > Is it possible to open Bloomberg using this command?

    >
    >


  4. #4
    Tom Ogilvy
    Guest

    re: Shell command

    if you could go into the command prompt and type a command that will start it
    or perhaps type the command in the run box under windows start, then yes, you
    should be able to execute that command with SHELL.

    --
    Regards,
    Tom Ogilvy


    "Viktor Ygdorff" wrote:

    > Hello! Sorry I meant the Bloomberg program. Thanks anyway.
    >
    > "Andrew Taylor" skrev:
    >
    > > If you mean you want to open the Bloomberg website, try this:
    > > (lines split to avpoid wrapping)
    > >
    > > Private Declare Function ShellExecute _
    > > Lib "shell32.dll" Alias "ShellExecuteA" _
    > > (ByVal hwnd As Long, _
    > > ByVal lpOperation As String, _
    > > ByVal lpFile As String, _
    > > ByVal lpParameters As String, _
    > > ByVal lpDirectory As String, _
    > > ByVal nShowCmd As Long) As Long
    > >
    > > Sub OpenBloomberg()
    > > Dim RetVal As Long
    > > RetVal = ShellExecute(0&, "OPEN", _
    > > "http://www.bloomberg.com", "", 0&, 1)
    > > End Sub
    > >
    > >
    > >
    > >
    > > Viktor Ygdorff wrote:
    > > > VBA has a Shell command that can open certain programs like this:
    > > >
    > > > RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator
    > > >
    > > > Is it possible to open Bloomberg using this command?

    > >
    > >


  5. #5
    John.Greenan
    Guest

    re: Shell command

    This will not help as you have to login to the Bloomberg as well as simply
    running the executable.

    --
    www.alignment-systems.com


    "Tom Ogilvy" wrote:

    > if you could go into the command prompt and type a command that will start it
    > or perhaps type the command in the run box under windows start, then yes, you
    > should be able to execute that command with SHELL.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Viktor Ygdorff" wrote:
    >
    > > Hello! Sorry I meant the Bloomberg program. Thanks anyway.
    > >
    > > "Andrew Taylor" skrev:
    > >
    > > > If you mean you want to open the Bloomberg website, try this:
    > > > (lines split to avpoid wrapping)
    > > >
    > > > Private Declare Function ShellExecute _
    > > > Lib "shell32.dll" Alias "ShellExecuteA" _
    > > > (ByVal hwnd As Long, _
    > > > ByVal lpOperation As String, _
    > > > ByVal lpFile As String, _
    > > > ByVal lpParameters As String, _
    > > > ByVal lpDirectory As String, _
    > > > ByVal nShowCmd As Long) As Long
    > > >
    > > > Sub OpenBloomberg()
    > > > Dim RetVal As Long
    > > > RetVal = ShellExecute(0&, "OPEN", _
    > > > "http://www.bloomberg.com", "", 0&, 1)
    > > > End Sub
    > > >
    > > >
    > > >
    > > >
    > > > Viktor Ygdorff wrote:
    > > > > VBA has a Shell command that can open certain programs like this:
    > > > >
    > > > > RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator
    > > > >
    > > > > Is it possible to open Bloomberg using this command?
    > > >
    > > >


+ 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