Launch excel

Mromano

New Member
Joined
Jan 30, 2017
Messages
37
I have been using this comand to launch exel on website. No matter how I change it I cannot get it to launch excel.

For Each ele In objie.Document.getElementsByTagName("input")
' If ele.Value = "Launch Excel" Then ele.Click: Exit For



This is the inspect.

<input class="btn btn-primary" type="button" name="butLaunchExcel" value="Launch Excel" *******="ExcelLaunch()">



Thank you in advance
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
What application is the code running in?
 
Upvote 0
You mean an html file opened in a browser?
 
Upvote 0
I create a report on a website called service channel I have most of the script I will paste below but for some reason when I go to click launch excel it does not work I don't know if I need a pause or I am doing something wrong


Const MyUserName As String = "xxxxxxx"
Const MyPassword As String = "xxxxxxx"
Const dayfrom As String = "12/01/2015"
Const READYSTATE_COMPLETE As Integer = 4


Dim objie As Object


Public Sub LoginScriptSC()

Set objie = CreateObject("InternetExplorer.Application")

With objie
.Visible = True
.Silent = True
.Navigate ("http://www.servicechannel.com/sc/login/client_login.asp")

Do Until .ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
Application.Wait Now() + TimeValue("00:00:01")
.Document.all.UserName.Value = MyUserName
.Document.all.Password.Value = MyPassword
.Document.all.RememberMe.Value = True
.Document.forms(0).submit
Do Until .ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
Application.Wait Now() + TimeValue("00:00:01")
End With


With objie
.Visible = True
.Silent = True
.Navigate ("http://www4.servicechannel.com/sc/login/reports/workhistory.asp?rpst=5")
Do Until .ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
Application.Wait Now() + TimeValue("00:00:01")
End With

objie.Document.getElementById("arrow-collapse4").Click
objie.Document.all.dayfrom.Value = dayfrom
objie.Document.getElementById("arrow-collapse7").Click

Dim ele As Object


For Each ele In objie.Document.getElementsByTagName("input")
If ele.Value = "PF" Then ele.Click: Exit For
Next

For Each ele In objie.Document.getElementsByTagName("input")
If ele.Value = "msexc" Then ele.Click: Exit For
Next
For Each ele In objie.Document.getElementsByTagName("input")
If ele.Value = "Retrieve Report" Then ele.Click: Exit For

Next

For Each ele In objie.Document.getElementsByTagName("input")
If ele.Value = "Launch Excel" Then ele.Click: Exit For

Next



End Sub
 
Upvote 0
That's VBA, not html, right?

So this is running in Excel, correct?
 
Upvote 0
I am using a vba script to to create my report from on website The last button last button on the website is launch excel and for some reason it will not launch.
 
Upvote 0
Why open another instance of Excel? It's already open, right?
 
Upvote 0
yes I open excel to run the script. after creating the report on the website the way I retrieve the report from the website is to launch excel from the website that I created the report on.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top