Connecting Tech Pros Worldwide Forums | Help | Site Map

Follow Hyperlink

ARC
Guest
 
Posts: n/a
#1: Sep 25 '08
Hello all,

I'm trying to put a buy button in my app, and using the follow hyperlink
command.

If I take the address below and copy/paste into IE, it correctly adds the
item to the shopping cart. However, if I use the statement below on a
button, it opens the page, but says "There are no items in your shopping
cart".

I wonder if it's getting hung up on the special characters like the ? or the
&?


Application.FollowHyperlink
"https://www.keysecure.com/pcesoft.com/cart.cgi?item=IBILL01&cart=pcesoftshopping"



jonceramic
Guest
 
Posts: n/a
#2: Sep 26 '08

re: Follow Hyperlink


On Sep 25, 11:20*am, "ARC" <PCES...@PCESoft.invalidwrote:
Quote:
Hello all,
>
I'm trying to put a buy button in my app, and using the follow hyperlink
command.
>
If I take the address below and copy/paste into IE, it correctly adds the
item to the shopping cart. However, if I use the statement below on a
button, it opens the page, but says "There are no items in your shopping
cart".
>
I wonder if it's getting hung up on the special characters like the ? or the
&?
>
Application.FollowHyperlink
"https://www.keysecure.com/pcesoft.com/cart.cgi?item=IBILL01&cart=pces..."
&'s are sometimes interpreted to mean you're going to define which
letter is a default alt-key combo.

You could try replacing with the %xx equivalents. (i.e. %20 = space.)
http://www.blooberry.com/indexdot/ht...rlencoding.htm

Or, you could have a security setting set that's stopping you.

Jon
ARC
Guest
 
Posts: n/a
#3: Sep 27 '08

re: Follow Hyperlink


Thanks, Jon.

I actually stumbled upon a solution. If I use the Shell command rather than
followhyperlink, it works fine.

Such as:
General Declarations
----------------------
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

Public Const SW_HIDE = 0
Public Const SW_SHOWNORMAL = 1
Public Const SW_SHOWMINIMIZED = 2
Public Const SW_SHOWMAXIMIZED = 3
Public Const SW_SHOW = 5



Public Function FollowBuy() As Boolean
On Error Resume Next
Dim addr As String
addr =
"https://www.keysecure.com/pcesoft.com/cart.cgi?item=INSCUSTDEV&cart=pcesoftshopping"
ShellExecute 0, "open", addr, 0, 0, SW_SHOWNORMAL
'retval = Shell(addr, 1)
End Function





Closed Thread