Okay, I have a textbox on a form. It holds a first name, and a last name... separated by a space..
What I am trying to do, And have zero idea how.. except I can use trim...
The code below is putting in first and last name in both of the fields.. I have searched the trim function.. and I guess a Ltrim and Rtrim will be used... but not sure how to accomplish this... Any assistance is appreciated.
Code:
Sub Adduser()
Dim oIE As InternetExplorer
Dim First, Last As String
Set oIE = FindIE("https://sensitivewebsitedata!!!/")
On Error GoTo NotOpen:
oIE.Document.all.tags("a").Item(24).Click
PauseApp 1.5
oIE.Document.all.Item("inputFirstName").Value = Forms!frmmainnew!.txtaddUser1 '''This should only be putting in the first name
oIE.Document.all.Item("inputLastName").Value = Forms!frmmainnew!.txtaddUser1 '''This should only be putting in the Last name
NotOpen:
If Err.Number = 91 Then
MsgBox "L&M Admin is NOT open!"
MsgBox Err.Number & Err.Source & Err.Description
End If
Set oIE = Nothing
End Sub