Created
November 3, 2010 18:37
-
-
Save onodes/661488 to your computer and use it in GitHub Desktop.
IDManagerForExcelVBA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CommandButton1_Click() | |
Dim ie As Object | |
Dim data(20) As String | |
Dim i As Integer | |
For i = 1 To 20 | |
data(i) = Cells(i, 1) | |
Next i | |
Set ie = CreateObject("InternetExplorer.Application") | |
ie.Navigate Cells(1, 3).Value | |
ie.Visible = True | |
waitIE ie | |
i = 1 | |
For Each f In ie.Document.all.tags("input") | |
' TEXTBOX | |
If LCase(f.Type) = "text" Then | |
Debug.Print f.Name | |
f.Value = data(i) | |
i = i + 1 | |
End If | |
Next f | |
End Sub | |
Sub waitIE(ie) | |
' http://www.excel.studio-kazu.jp/kw/20070219032632.html | |
' http://www.ken3.org/cgi-bin/group/vba_ie.asp#Document_ReadyState_Busy | |
Do While ie.Busy = True Or ie.readystate <> 4 | |
DoEvents | |
Loop | |
Sleep 100 | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment