Help required to for similar code to Work With google Chrome instead of IE

sankybadlapur

New Member
Joined
Apr 27, 2018
Messages
1
Hi Friends,

I am new to VBA, Need help to work this code in Google Chrome instead of IE since its not supported by Web Site:

Code:
Private Sub uploaddata_Click()


Dim ieDoc As Object
Dim sws As SHDocVw.ShellWindows
Dim strURL As String
Dim n As Integer
'Set main URL to evaluate open IE windows
strURL = "http://xxxxx.com/"
Set sws = New SHDocVw.ShellWindows
'Cycle through all open IE windows and assign the window whose URL matches strURL
For n = 0 To sws.count - 1
If Left(sws.Item(n).LocationURL, Len(strURL)) = strURL Then
Set ieDoc = sws.Item(n).Document
sws.Item(n).Visible = True
Exit For
End If
Next n
ieDoc.all("_txt_placeofbirth_in").Value = birthcity.Value
ieDoc.all("_txt_nameofthefamilymember_in").Value = emername.Value
ieDoc.all("_cmb_gender_in").Value = gender.Value
ieDoc.all("_cmb_bloodgroup_in").Value = bloodgroup.Value
ieDoc.all("_cmb_differentlyabled_in").Value = "I do not wish to disclose"
ieDoc.all("_cmb_religion_in").Value = religion.Value
ieDoc.all("_cmb_castecategory_in").Value = cast.Value
ieDoc.all("_cmb_nationality_in").Value = "India"
ieDoc.all("_cmb_maritalstatus_in").Value = "Single"
ieDoc.all("_txt_econtactper1_in").Value = emername.Value
ieDoc.all("_txt_econtactphone1_in").Value = emercontact.Value
ieDoc.all("_cmb_econtactrel1_in").Value = emerrelation.Value
ieDoc.all("_cmb_exserviceman_in").Value = "No"






End Sub
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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