另外可以請問你的urng代表的是什麼嗎?
urng是代表儲存格中的代號、
Dim WebSht As Worksheet, xURL$, GetInfo$, uRng As Range, ErrNo, LL, RR, CC, TT
Sub 更新全部()
Dim y&, TM, i&
If MsgBox("要全部更新嗎? ", 4 + 32 + 256) = vbNo Then Exit Sub
TM = Time: ErrNo = 0: [A1] = "00:00:00"
[L5:ZZ600].ClearContents: [K6:K600].ClearContents: [L4].Select
Application.ScreenUpdating = False
y = [zz4].End(xlToLeft).Column: If y < 12 Then Exit Sub
For i = 12 To y Step 10
If ErrNo > 0 Then GoTo 102
Set uRng = Cells(4, i)
uRng.Select
If uRng <> "" Then Call 更新Web: Call 載入數據
[A1] = Format(Time - TM, "hh:mm:ss")
Next i
Application.ScreenUpdating = True
102: Beep
End Sub
Sub 載入數據()
Dim lastrow&, TT, DD, SS
TT = Left(WebSht.[B4], Len(WebSht.[B4]) - 7)
DD = Right(TT, Len(uRng))
SS = Left(TT, Len(TT) - Len(uRng) - 1)
lastrow = WebSht.[b13].End(xlDown).Row
If DD <> uRng Then Exit Sub
uRng(2) = SS
uRng(2, -1).Resize(lastrow - 7, 1) = WebSht.[b13].Resize(lastrow - 7, 1).Value '日期資料欄
uRng(2, 1).Resize(lastrow - 7, 10) = WebSht.[c12].Resize(lastrow - 7, 10).Value '三大法人資料
Dim WebSht As Worksheet, xURL$, GetInfo$, ErrNo, TT As String, DD As String, SS As String, uRng As Range
Sub 更新全部()
Dim y&, TM, i&
If MsgBox("要全部更新嗎? ", 4 + 32 + 256) = vbNo Then Exit Sub
TM = Time: ErrNo = 0: [A1] = "00:00:00"
[L5:ZZ600].ClearContents: [K6:K600].ClearContents: [L4].Select
y = [zz4].End(xlToLeft).Column: If y < 12 Then Exit Sub
For i = 12 To y Step 10
If ErrNo > 0 Then GoTo 102
Set uRng = Cells(4, i)
uRng.Select
If uRng <> "" Then Call 更新Web: Call 載入數據
[A1] = Format(Time - TM, "hh:mm:ss")
Next i
102: Beep
End Sub