Community discussion forum

Can you describe Above simple code?

  • 1 month ago

    ///////////////////////////////////////////////////// Dim p As Integer 'Declared Globally Dim k As Integer 'Declared Globally ///////////////////////////////////////////////////// Private Sub Send_Click() p = 0 Do While p < (3*4) '3 is 3Sec SAP window Activation Delay.... DoEvents Loop

       For i = 1 To 12  
           dispcol (i)
       Next i
    

    End Sub

    Private Sub dispcol(i As Integer) k=0 Do While k<1 '1Sec delay to each value from grid row DoEvents Loop SendKeys "test"

    End Sub

    Private Sub Timer1_Timer() p = p + 1 If p > (Text1 * 4) Then p = 0 End If

    k = k + 1 If k > txtdl Then k = 0 End If End Sub

    The application has been coded to send key stroke to SAP window from VB application. The Application is like there is grid in VB form and user can send strings to SAP window(TextBoxes in SAP). I have used WIN API. Its woking fine but I did not understand above code By click on Send button I'm getting time of 3Sec to activate my SAP window and after 3Sec the values from grid Row are sending to SAP text boxes after every 1 sec

    Please can you Explain flow of code and use of Timer * *

    Post was edited on 24/10/2009 05:14:35 Report abuse

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!