Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shell32.DLL help

Status
Not open for further replies.

Brenton

Technical User
Jul 29, 2002
43
US
I am trying to open a file through an API callout, and i am getting errors. Can someone help? Is there an easier way?


Public 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

'here is my code to call it

Dim File As String
File = Path + List1.Text
Call ShellExecute(Me.hwnd, "Open", "RhinoScriptEditor.exe", File, "C:\Program Files\RhinoScript Editor\", vbNormalNoFocus)

 

??? 0 out of 12 ??? and only 6 replies in the threads you have started???

Please Read FAQ222-2244

Now for an attempt to help. Are you sure that the path is formatted correctly??? i.e. "C:\SomeDirectory\" and I take it list1 contains a list of files from this directory??? Do they have the extension included? Are you sure that the user has selected an item???

And the word File is not normally a keyword in VB unless you have a reference to other libraries or certain controls, so...
[tt]
MyFile = Path & List1.Text
[/tt]

Good Luck


 
That did it...

your help is appreciated

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top