×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Put Text In IE field from attachmate

Put Text In IE field from attachmate

Put Text In IE field from attachmate

(OP)
I have written a macro which loads up a invoice and allows the user to enter the desired ifnormation and make a record of payment the entire macro works fine hower I have added a section to it enter set text in the payment screen which is internet explorer based, the section of code that attachmate doesn't like is;
.Document.all("Group ID").Value = "8164"
.Document.all("Invoice Number").Value = "8"

It compiles ok, everything before and after runs fine but  i've tried putting objIE before these but still doesn't run these lines please find my code beleow thanks for you help in advance.


 Sub Main()
'--------------------------------------------------------------------------------
' Get the main system object
        
    Dim Sessions As Object
    Dim System As Object
        Dim MyScreen As Object
        Dim MyArea As Object
        Dim objIE As Object

        
    Set System = CreateObject("EXTRA.System")    ' Gets the system object
    If (System is Nothing) Then
        Msgbox "Could not create the EXTRA System object.  Stopping macro playback."
        STOP
    End If
    Set Sessions = System.Sessions

    If (Sessions is Nothing) Then
        Msgbox "Could not create the Sessions collection object.  Stopping macro playback."
        STOP
    End If
'--------------------------------------------------------------------------------
' Set the default wait timeout value
    g_HostSettleTime = 0' milliseconds

    OldSystemTimeout& = System.TimeoutValue
    If (g_HostSettleTime > OldSystemTimeout) Then
        System.TimeoutValue = g_HostSettleTime
    End If

' Get the necessary Session Object
    Dim Sess1 As Object
    Set Sess1 = System.ActiveSession
    If (Sess1 is Nothing) Then
        Msgbox "Could not create the Session object.  Stopping macro playback."
        STOP
    End If
    If Not Sess1.Visible Then Sess1.Visible = TRUE

 

'--------------------------------------------------------------------------------

Dim IE As Object
AppActivate "Application name  - Windows Internet explorer"

DoEvents
.Document.all("Group ID").Value = "8164"
.Document.all("Invoice Number").Value = "8"

While IE.busy
DoEvents
Wend

While IE.busy
DoEvents
Wend
'--------------------------------------------------------------------------------

' This section of code contains the recorded events    

        Sess1.Screen.Sendkeys("<Find>NBABA<Ctrl+M>")        
    Sess1.Screen.Sendkeys("NB50")
    Sess1.Screen.Paste
        Sess1.Screen.WaitHostQuiet(g_HostSettleTime)
        Sess1.Screen.Sendkeys("D<Ctrl+M>")
        Sess1.Screen.WaitHostQuiet(10000)
        Sess1.Screen.Sendkeys("<Find>")
        Sess1.Screen.Sendkeys("<Right><Right><Right>1<Ctrl+M>")   
        Sess1.Screen.WaitHostQuiet(g_HostSettleTime)
        Sess1.Screen.MoveTo 23, 73, 01
    Sess1.Screen.WaitHostQuiet(g_HostSettleTime)
        Sess1.Screen.Sendkeys("AC")
        Sess1.Screen.Sendkeys("<Tab>")
        Sess1.Screen.Sendkeys("EPDQ - ")

'-------------------------------------------------------------------------------    System Waits Until Enter Key Is Pressed
   

        Dim waits as Object
    Set waits = System.Waits
        Dim w1 as Object
        Set w1 = Sess1.Screen.Waitforkeys("<Keypad Enter>")
        id1 = waits.Add(w1)
        retval = waits.Wait(500000)

'-------------------------------------------------------------------------------    Once Enter Key Pressed Again NB40 is Loaded
        
        ' Set the default wait timeout value
    g_HostSettleTime = 100' milliseconds
        
        Sess1.Screen.Waitforkeys("<Keypad Enter>")              
        Sess1.Screen.Sendkeys("<Find>NBABA<Ctrl+M>")          
    Sess1.Screen.Sendkeys("NB40<Ctrl+M>")    
    Sess1.Screen.Sendkeys("CREDIT CARD PAYMENT<Keypad 1><Keypad 2>/")
        Sess1.Screen.putstring format(date,"yy"), 1,2
        Sess1.Screen.WaitHostQuiet(g_HostSettleTime)
    Sess1.Screen.Sendkeys("<Tab><Keypad 1>")       
        Sess1.Screen.Paste
        Sess1.Screen.WaitHostQuiet(g_HostSettleTime)
        Sess1.Screen.SendKeys ("<Tab>")         
    Sess1.Screen.putstring format(date,"ddmmyy"), 1,2
        Sess1.Screen.WaitHostQuiet(g_HostSettleTime)
        Sess1.Screen.Sendkeys("<Keypad 5>")    
    Sess1.Screen.Sendkeys("<Keypad .><Tab>")    
    Sess1.Screen.Sendkeys("<Keypad .><Tab>")    
    Sess1.Screen.Sendkeys("<Keypad .><Tab>")    
        Sess1.Screen.Sendkeys("<Keypad .><Tab>")
    Sess1.Screen.Sendkeys("SK1 2FB<Tab>")
    Sess1.Screen.Sendkeys("<Keypad 8><Keypad 1><Keypad 6><Keypad 4>")
        Sess1.Screen.WaitHostQuiet(g_HostSettleTime)
        Sess1.Screen.MoveTo 15, 20, 01         
        
'-------------------------------------------------------------------------------    System Waits Until Enter Key Is Pressed
   
        'Set waits = System.Waits
        'Dim w2 as Object
        'Set w2 = Sess1.Screen.Waitforkeys("<Keypad Enter>")
        'id1 = waits.Add(w2)
        'retval = waits.Wait(500000)

'-------------------------------------------------------------------------------    Once Enter Key Pressed Again NB40 is Loaded    
     
        Sess1.Screen.Waitforkeys("<Keypad Enter>")
        Sess1.Screen.Sendkeys("** COMPLETE **")     
    System.TimeoutValue = OldSystemTimeout

End Sub
 

RE: Put Text In IE field from attachmate




hi,

I am not going to sift thru your code to find, what you ought to know.

The PROBLEM code that you posted...

CODE

--------------------------------------------------------------------------------

Dim IE As Object
AppActivate "Application name  - Windows Internet explorer"

DoEvents
.Document.all("Group ID").Value = "8164"
.Document.all("Invoice Number").Value = "8"
has an IMPLIED OBJECT REFERENCE.  That is what the leading DOT means.

What is that REFERENCE???
I'm not going to hunt for it.

If it does not exist, then THAT is part or all of your problem.


 

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Put Text In IE field from attachmate

(OP)
Thanks for coming back to me so quick Skip, using  
a macro to manipulate Explorer is new to me I have
modified the code using a similar post on this forum
However the problem still persists and the create object just loads internet explorer, I dont expect you to sift rthough all the code or hunt for the Implied object reference, is there a another post on here or a webpage you can point me in the direction of which will explain what that is and how to use it.

Thanks

Set objIE = CreateObject("InternetExplorer.Application")               
With objIE
        
.Visible = True
.Navigate "internal site"

Dim IE As Object
AppActivate "Application Name - Windows Internet explorer"

DoEvents
.Document.all("Group ID").Value = "8164"
.Document.all("Invoice Number").Value = "8"

While IE.busy
DoEvents
Wend

End With    

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close