ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shell (https://www.excelbanter.com/excel-programming/367093-shell.html)

Viktor Ygdorff

Shell
 
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?


Andrew Taylor

Shell
 
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?



Viktor Ygdorff

Shell
 
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?




Tom Ogilvy

Shell
 
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?




John.Greenan

Shell
 
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?




All times are GMT +1. The time now is 05:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com