The above line is actually in a VB6 dll that I call from Excel VBA.
Anyway, the asp script displays a web page and sends me an email. The
page displays in the default browser just as expected, but I get two
emails when this line is called once from Excel.
If I enter the same URL string manually in the browser, I only get one
email. So something goofy is happening with the FollowHyperlink that
I don't understand.
Does anyone know why this would happen?
On Jun 22, 1:11 pm, Brian Murphy <bmur...@xlrotor.com> wrote:
> I am using the following statement to run an asp script on my web
> ExcelApp.ActiveWorkbook.FollowHyperlink address:=""http://www.xlrotor.com/internet_update.asp", NewWindow:=True
I'm not 100% sure, but it's possible that every once in a while I only
get one email. But certainly most of the time I get two.
I know Excel's FollowHyperlink is tempting for its simplicity even in a VB6
dll, but maybe try something like this -
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 Declare Function GetDesktopWindow Lib "user32" () As Long
Dim sURL As String
sURL = "http://www.xlrotor.com/internet_update.asp"
Call ShellExecute(GetDesktopWindow(), vbNullString, sURL, _
vbNullString, vbNullString, vbNormalFocus)
"Brian Murphy" <bmu...@xlrotor.com> wrote in message