dcsimg
Results 1 to 3 of 3

Thread: VBA to VBs

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2019
    Posts
    1

    VBA to VBs

    Hi

    Sorry I don't speak englis very well...

    Could someone help me to convert this code tos code vbs or batch ?

    Thanks

    PAscal

    Code:
    Private Sub ValeurCarte_LostFocus()
    
    'Déclaration des variables
    Dim winShell As New ShellWindows
    Dim IE As InternetExplorer
    Const stURL As String = "https://ecritf.paytec.ch/"
    Dim IEDoc As HTMLDocument
    Dim InputGoogleZoneTexte As HTMLInputElement
     
    For Each IE In winShell
         If IE.LocationURL = stURL Then Exit For
    Next IE
     
    If Not IE Is Nothing Then
    
      'Affichage de la fenêtre IE
       IE.Visible = True
     
        'On pointe le membre Document
        Set IEDoc = IE.Document
     
        'On pointe notre Zone de texte
        Set InputGoogleZoneTexte = IEDoc.all("amount")
     
        'On définit le texte que l'on souhaite placer à l'intérieur
        InputGoogleZoneTexte.Value = Me.[Valeur Carte]
        
        'On pointe notre bouton
    Set InputGoogleBouton = IEDoc.all("pay")
    
    'On simule un clic
    InputGoogleBouton.Click
        
        End If
     
    'On libère les variables
        Set IE = Nothing
        Set IEDoc = Nothing
     
    End Sub

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    103,450

    Re: VBA to VBs

    This question has nothing at all to do with VB.NET so it doesn't belong in the VB.NET forum. VBScript is not VB.NET. I have asked the mods to move this thread.

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,261

    Re: VBA to VBs

    Welcome to VBForums

    I have moved this thread from the 'VB.Net' forum to the 'VBScript' forum

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width