FollowHyperlink problems

  • Thread starter Thread starter Susan
  • Start date Start date
S

Susan

I have in the past used FollowHyperlink to call a cgi
script on our webserver to submit data to the website. I
first exported my data to a text file then called the cgi
script to use the data.

Now I have a situation where I can't use a text file, but
need to submit a line to the website that includes data
at the end of the line that will come from a text box in
my form that I'm submitting from. If I paste the line in
my browser it works fine, but when I try to use code
using FollowHyperlink, it hangs up.

Is there sample code available to place the contents of a
text field as the path to "Follow"?
Thanks!
Susan
 
You might want to try using the named argument "ExtraInfo" in your
Application.FollowHyperlink statement. Here is some code that could go in
the Click event of a Command Button.

Dim strLinkPath as string
Dim strExtra as string

strLinkPath = "http://www.DesiredDomain.com/"
strExtraInfo = "My Text Line" & Me!MyTextBox

' When testing, stick a MsgBox here so that you can
' see exactly what the HyperLink looks like.
' Delete when you are satisfied the result.

MsgBox strLinkPath & strExtraInfo

Application.FollowHyperlink Address:=strLinkPath, extrainfo:=strExtra,
NewWindow:=True

If you need more, please post back with the exact link and string values to
be included in the hyperlink, plus any error messages you may receive.
 
Back
Top