RentRight
asked on
VB3: Access web site URL from program
I would like to open the default browser and go to my web site (or any other URL) from my program (VB3). I tried using"
ShellExecute(0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus)
(by the way, where is vbNullString defined? I would think this would give me an undefined error)
This worked at home. I came in to work and tried it and the shellexecute returns a 2 (could not find file, i think, what file?) and does not open IE.
Thanks in advance,
Rob
ShellExecute(0&, vbNullString, URL, vbNullString, vbNullString, vbNormalFocus)
(by the way, where is vbNullString defined? I would think this would give me an undefined error)
This worked at home. I came in to work and tried it and the shellexecute returns a 2 (could not find file, i think, what file?) and does not open IE.
Thanks in advance,
Rob
Check if you have assosiation for .html files
If you're working with Windows NT, 16 bit ShellExecute will give error code 2 if the associated executable file exists in a directory path containing a long file name. This happens only on Windows NT systems, Windows 3.x and Windows 95 will work fine.You can find more info in Microsoft Knowledge base article Q172982.
ASKER
I am using windows 95, I checked the association by puting a shortcut on my desktop that was "http://www.rent-right.com" This opens IE and dials in.
One other thing, I have two PC's at work. One gives me an error (undefinded var.) for vbnullString, the other does not. But both fail with a 2 from shellexecute.
Thanks for the help,
Rob
One other thing, I have two PC's at work. One gives me an error (undefinded var.) for vbnullString, the other does not. But both fail with a 2 from shellexecute.
Thanks for the help,
Rob
ASKER
Adjusted points to 120
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, you got it.
It was the way I was declaring ShellExecute. I used the declare out of the book using the Windows API with VB. When I changed it to your declare, all of my previous versions worked.
Thanks again.
It was the way I was declaring ShellExecute. I used the declare out of the book using the Windows API with VB. When I changed it to your declare, all of my previous versions worked.
Thanks again.