|
楼主 |
发表于 2024-4-1 10:55
|
显示全部楼层
我自己写的,循环没有学好,怎么写也写不下去 了,请老师帮我改一下。
Sub a()
Dim ie1 As Object, url As String, i As Long, n As Long,k%, z%
Cells.NumberFormat = "@"
Set ie1 = UserForm1.WebBrowser1
For n = 2 To [a65536].End(3).Row
url = Cells(n, 1).Value
k = Sheets.Count
ReDim arr(1 To k)
For z = 1 To k
arr(z) = Sheets(z).Activate
next
With ie1
.Navigate url
Do Until .ReadyState = 4
DoEvents
Loop
.Document.body.Focus
.Document.execCommand "SelectAll"
.Document.execCommand "copy"
Range("e1").Select
ActiveSheet.Paste
End With
Next
Set ie1 = Nothing
End Sub
|
|