colangeloc
New Member
- Joined
- Sep 27, 2015
- Messages
- 8
Hello,
I am currently running into a problem when trying inputting code into a web form. The code I have works fine for entering in the information but I am getting an error from the system stating that the entry is invalid even though its correct. If I copy and past into this field the website reformats the data. I have tried making vba input the data in the exact same format without any luck. The website is a company internal so I can't post to much details.
I am having an issue with both the mobile ID & customer name. again vba enters the info but the website is not taking it the same way as if I copy any paste.
I am currently running into a problem when trying inputting code into a web form. The code I have works fine for entering in the information but I am getting an error from the system stating that the entry is invalid even though its correct. If I copy and past into this field the website reformats the data. I have tried making vba input the data in the exact same format without any luck. The website is a company internal so I can't post to much details.
Code:
Sub populateform()
marker = 0
Set objShell = CreateObject("Shell.Application")
IE_count = objShell.Windows.Count
For x = 0 To (IE_count - 1)
On Error Resume Next ' sometimes more web pages are counted than are open
my_url = objShell.Windows(x).******************
my_title = objShell.Windows(x).Document.Title
If my_title Like "Add New Discrepancy" & "*" Then 'compare to find if the desired web page is already open
Set IE = objShell.Windows(x)
marker = 1
Exit For
Else
End If
Next
IE.Document.all("mobileID").Value = ThisWorkbook.Sheets(1).range("a2")
IE.Document.getElementById("customerName").Value = ThisWorkbook.Sheets("sheet1").range("b2")
End Sub
I am having an issue with both the mobile ID & customer name. again vba enters the info but the website is not taking it the same way as if I copy any paste.
Code:
<input id="mobileID" type="text" maxlength="15" data-bind="phoneValue: MOBILE_ID, click: mobileIdFocusFn, hasFocus: mobileIdHasFocus">
Code:
<input id="customerName" type="text" maxlength="25" data-bind="value: CUSTOMER_NAME, click: customerNameFocusFn, hasFocus: customerNameHasFocus">