I'm lost...towards the bottom I have put what I'm looking to do...
Can anyone help...?
Sub NPIEntry()
Dim objIENPI
'************Quotation
Dim myCell As Range
'************
Set objIENPI = CreateObject("InternetExplorer.Application")
objIENPI.Visible = False
'************************Application Activate
Set WshShell = CreateObject("WScript.Shell")
'******************************************
'************
'NPI Registry
objIENPI.navigate2 "objIENPI.Visible = True
Application.Wait (Now + TimeValue("0:00:1"))
While objIENPI.busy
Wend
objIENPI.Visible = True
WshShell.AppActivate "Name or Category"
'**************NPI Number
Application.Wait (Now + TimeValue("0:00:2"))
WshShell.AppActivate "Name or Category"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
'******************************************
I'm tring to get the outcome of if cell I10 is greater than 0 then enter cell I10 and hit enter and if cell I10 has no value then I want cell I8 and I9 to sendkeys and enter.
'********************************************
If Range("I10") <> 0 Then
Name = Range("I10")
WshShell.SendKeys Name
End If
If Range("I10") = 0 Then
WshShell.SendKeys "{Tab}"
Name = Range("I8")
WshShell.SendKeys "{Tab}"
Name = Range("I9")
End If
WshShell.SendKeys "{Enter}"
End Sub
'
Can anyone help...?
Sub NPIEntry()
Dim objIENPI
'************Quotation
Dim myCell As Range
'************
Set objIENPI = CreateObject("InternetExplorer.Application")
objIENPI.Visible = False
'************************Application Activate
Set WshShell = CreateObject("WScript.Shell")
'******************************************
'************
'NPI Registry
objIENPI.navigate2 "objIENPI.Visible = True
Application.Wait (Now + TimeValue("0:00:1"))
While objIENPI.busy
Wend
objIENPI.Visible = True
WshShell.AppActivate "Name or Category"
'**************NPI Number
Application.Wait (Now + TimeValue("0:00:2"))
WshShell.AppActivate "Name or Category"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
WshShell.SendKeys "{Tab}"
'******************************************
I'm tring to get the outcome of if cell I10 is greater than 0 then enter cell I10 and hit enter and if cell I10 has no value then I want cell I8 and I9 to sendkeys and enter.
'********************************************
If Range("I10") <> 0 Then
Name = Range("I10")
WshShell.SendKeys Name
End If
If Range("I10") = 0 Then
WshShell.SendKeys "{Tab}"
Name = Range("I8")
WshShell.SendKeys "{Tab}"
Name = Range("I9")
End If
WshShell.SendKeys "{Enter}"
End Sub
'