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:
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