I'm going to a webpage and clicking on a link to download a file. The
webpage HTML for the link is

<SPAN
class=Menu
onClick='ExportReport()"
onKeyPress="CheckKeyPressed('ExportReport')"
onfocus="MenuFocus()"
onblur="MenuBlur()"
hidefocus=true
title="Exports the report data and column headings to a CSV file."
tabindex=0
accesskey=2
id=mnuExport>Export</SPAN>

The ExportReport() function is defined in the webpage header as

Sub ExportReport
' Export the form by re-calling this page with export=yes
document.frmReport.Action=" ...webpage URL... "
document.frmReport.export.value="yes"
document.frmReport.submit
End Sub

When I manually click on the link, I get the usual "File Download"
message box asking if I want to open the file, download the file, or
cancel. However, when I try to automate the process using the
following VBScript code

Set objIE = CreateObject( "InternetExplorer.Application" )
objIE.Navigate " ...webpage URL... "
Set objExport = objIE.Document.GetElementByID( "mnuExport" )
objExport.Click

instead of getting the "File Download" message box, the original
webpage is just reloaded. Can anyone tell me what I am doing wrong?
I'm using Internet Explorer 6, in case it matters. Thanks in advance
to all who respond.