Late binding version, reference to Microsoft Internet Controls is not required:
Rich (BB code):
Sub GetIE_LateBinding()
Dim IE As Object
With CreateObject("Shell.Application").Windows
If .Count > 0 Then
' Get IE
Set IE = .Item(0) ' or .Item(.Count - 1)
Else
' Create IE
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
End If
IE.Navigate "http://support.microsoft.com/kb/q176792/"
Set IE = Nothing
End With
End Sub
P.S. Window of any MS Explorer can be catched, not only of MS Internet Explorer.
Hi Vladimir,
Thank you for the above code which helps me to open web page in same tab instead of to open second window or tab.
I need your help to go next step. using your above code i would like to add the following steps :
1 - Copy Cell A2 (sheet name : Sheet1)
2 - Go to Opened tab "www......... [ using Valadimir code GetIE_LateBinding() which is working perfectly]
3 - Paste the above copied cell value (eg A2) in Job Number Box [ HTML CODING
input name="0_31"tabindex="2" title="Job Number" class="textfieldautosuggesttextfield" id="C0_31"
4 - Go & Click the search button to search above job number [ HTML Coding
img name="hc_Find" title="Find(Ctrl+Alt+I)" id="hc_Find" ***********="this.src='/jde/img/hc_Findmo.gif'"**********="this.src='/jde/img/hc_Find.gif'"*******="javascript:JDEDTAFactory.getInstance('').post('0_15')"alt="Find (Ctrl+Alt+I)" src="/jde/img/hc_Find.gif"border="0"
5 - Click button >| to go Last line [HTML Coding
a title="Go to end"id="GOTOLAST0_1" style="text-decoration: none;"href="javascript:*******=JDEDTAFactory.getInstance('').post('gLS0_1')"><imgname="jdehtmlGridDown" title="Go to end" id="jdehtmlGridDown"***********="this.src='/jde/img/alta/grid/last_ovr.png'"**********="this.src='/jde/img/alta/grid/last_ena.png'"*******="" alt="Go to end"src="/jde/img/alta/grid/last_ena.png" border="0"></a>
img name="jdehtmlGridDown"title="Go to end" id="jdehtmlGridDown"***********="this.src='/jde/img/alta/grid/last_ovr.png'"**********="this.src='/jde/img/alta/grid/last_ena.png'"*******="" alt="Go to end"src="/jde/img/alta/grid/last_ena.png" border="0">
6 - Click export button to Export data. HTML Coding
Script jdeWebGUIstartMenu(px"ToolsMenu");
jdeWebGUIaddMenuItem("ToolsMenu","Export Grid Data","javascript:toolsExitSelected('ExportData0010_1', '')","MENU","Export_To_Excel","Menu Item","",false,"","","false","");
7 - Click Continue button to save the above export data :
a tabindex="-1" title="Continue(Ctrl+Alt+E)" style="text-decoration: none;"><imgname="hc1" title="Continue (Ctrl+Alt+E)" id="hc1"***********="this.src='/jde/img/hc1mo.gif'"**********="this.src='/jde/img/hc1.gif'" *******="checkExportParams('');"alt="Continue (Ctrl+Alt+E)" src="/jde/img/hc1.gif"border="0"></a>
img name="hc1" title="Continue(Ctrl+Alt+E)" id="hc1"***********="this.src='/jde/img/hc1mo.gif'"**********="this.src='/jde/img/hc1.gif'"*******="checkExportParams('');" alt="Continue (Ctrl+Alt+E)"src="/jde/img/hc1mo.gif" border="0">
8 - after save the above export data go to next cell (A3)
9 - stop looping if Column A get blank (means end of job numbers) & show the msg Total Job numbers has been exported.
Any idea for the above ?
Your cooperation would be really really appreciated.
Best Regards,
Misbah