By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,560 Members | 1,070 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,560 IT Pros & Developers. It's quick & easy.

Follow Hyperlink

P: n/a
ARC
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"
Sep 25 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sep 25, 11:20*am, "ARC" <PCES...@PCESoft.invalidwrote:
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
Sep 26 '08 #2

P: n/a
ARC
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

Sep 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.