(µo°Ý)WEB¬d¸ß¡A¦p¦ó¨ú®ø¸õ¥XªºÄµ§iµøµ¡
- ©«¤l
- 150
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 215
- ÂI¦W
- 0
- §@·~¨t²Î
- windows xp
- ³nÅ骩¥»
- sp3
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2013-7-15
- ³Ì«áµn¿ý
- 2024-10-2
|
¥»©«³Ì«á¥Ñ blue2263 ©ó 2014-2-22 09:42 ½s¿è
½Ð±ÐG¤j§Úªº¤]¦³¬Û¦P°ÝÃD?¥i§_À°§Ú¬Ý¤@¤U,¤]·|¥X²{,web¬d¸ß¨S¦³¶Ç¦^¸ê®Æ°T®§
µ{¦¡½X°±¤î,¥X²{°T®§ªº¥N¸¹¦bA1499(Àx¦s®æ),§Ú´ú¸Õµo²{¤@Ó©_©Çªº²{¶H.¦pªG§â¤U¦Cµ{¦¡½X¦ì¸m,³]¦bA1456·|¥X²{¿ù»~°T®§
§â¦ì¸m³]¦bA1497,ª¬ºA´N¥¿±`,¿ù»~°T®§´N¤£·|¸õ¥X
½Ð±Ð¤£ª¾¦³¦ó¤èªk,¥i¸Ñ¨M³o°ÝÃD?
A.rar (81.8 KB)
µ{¦¡½X¦P¤U.........
Sub ¸ê®Æ¤U¸ü¾ã¦X()
'¸ê®Æºô¸ô¤U¸ü->¶×Á`Sheets
Dim Rng As Range, Ar(1 To 3)
Set Rng = Sheets("¥N½X").[a1456] '¥N½X°_©l¦ì¸m¦ba2
Do While Rng <> "" 'µL¥N½X ¤¤Â_
With Sheets("ì©lªí")
.Range("a6") = Rng
On Error GoTo 101 ' 'web ¬dµL ¨ì¤U¤@Ó¥N½X
.Range("az7").QueryTable.Refresh BackgroundQuery:=False
With .Range("BB12:BB27")
Ar(1) = Application.Transpose(.Cells) '¤H¼Æ
Ar(2) = Application.Transpose(.Offset(, 1)) 'ªÑ¼Æ
Ar(3) = Application.Transpose(.Offset(, 2)) '¦û¶°«O®w¦s¼Æ¤ñ¨Ò (%)
End With
End With
With Sheets("¶×Á`").Range("A1").End(xlDown).Offset(1) '¿ï¾Ü¤u§@ªí,¨ì³Ì©³¦æ
.Cells(1) = Rng
.Cells(1, 2) = Rng.Offset(, 1)
.Cells(1, "C").Resize(, UBound(Ar(1))) = Ar(1)
.Cells(1, "S").Resize(, UBound(Ar(1))) = Ar(2)
.Cells(1, "AI").Resize(, UBound(Ar(1))) = Ar(3)
.Cells(1, "AX") = ""
'.Range("A1:aw1").Value = Sheets("ì©lªí").Range("A6:aw6").Value
End With
101
Set Rng = Rng.Offset(1) '¤U¤@Ó¥N½X
Loop
End Sub |
|
|
|
|
|
|
- ©«¤l
- 36
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 51
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-10-30
- ³Ì«áµn¿ý
- 2015-1-31
|
ÁÂÁ±z¥Î¤ß«ü¾É¡A¦bModule1°õ¦æEx.
¤£ª¾¹D§Ú³o¼Ë¼g¹ï¤£¹ï¡A½ÐÀ°§Ú½T»{¡A¦]¬°Äµ§i°T®§ÁÙ¬O·|¶]¥X¨Ó¡A«¢«¢¡C
ªþ¤WÀɮרѱz°Ñ¦Ò~
Book2.rar (12.47 KB)
¼Ò²ÕModule1
Sub Ex()
Dim i As Integer, Test() As New Class1
'Test«ü©w¬° ·sª«¥óÃþ§O¼Ò²Õ : Class1ª«¥ó
On Error Resume Next
With Sheet1
.Range("A1:A3").Value = .Range("C1:C3").Value
End With
For i = 1 To Sheet2.QueryTables.Count
ReDim Preserve Test(1 To i)
Set Test(i).Query = Sheet2.QueryTables(i)
Test(i).Query.Refresh False
Next
End Sub
ª«¥óÃþ§O¼Ò¦¡ Class1
Option Explicit
Public WithEvents Query As QueryTable 'Query«ü©w¬°QueryTableª«¥ó
Private Sub Query_AfterRefresh(ByVal Success As Boolean) '¬d¸ß«áªº¨Æ¥ó
If Success = False Then '¬d¸ß¥¢±Ñ 'Success = True ¬d¸ß¦¨¥\
With Query.ResultRange
.Interior.ColorIndex = 37
.Cells(1).Offset(1).Resize(.Rows.Count - 1, .Columns.Count) = "¬dµL¸ê®Æ"
End With
End If
End Sub
Private Sub Query_BeforeRefresh(Cancel As Boolean) '¬d¸ß«eªº¨Æ¥ó
With Query.ResultRange
.Interior.ColorIndex = xlNone
End With
End Sub |
|
Hi~
|
|
|
|
|
- ©«¤l
- 36
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 51
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-10-30
- ³Ì«áµn¿ý
- 2015-1-31
|
ÁÂÁÂ¥ý¶iGBKEEª©¥D«üÂI°g¬z¡A²{¦b¤~ª¾¹DQuerytablesªº¥Îªk¡A¯uªº«Ü¨ü¥Î¡C
¤£¹L¡AÁÙ¬O·|¸õ¥X
"¦¹WEB¬d¸ß¨S¦³¶Ç¦^¸ê®Æ¡Anקï¬d¸ß¡A«ö[½T©w]......."µ¥ªº°T®§
¥²¶·±N³o°T®§ÂI±¼¡A¤~¯àÄ~Äò§ó·sWEB¬d¸ßªº¸ê®Æ¡A±`±`µ{¦¡¶]¤@¥b¥d¦í¡A«D±`§xÂZ¡C
¦A¦¸¤æÁx½Ð±Ð¡A¦³¤èªkÅý³o°T®§¤£n¸õ¥X¨Ó¶Ü¡H |
|
Hi~
|
|
|
|
|
- ©«¤l
- 36
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 51
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-10-30
- ³Ì«áµn¿ý
- 2015-1-31
|
ÁÂÁ±zªº¦^ÂСA¤w¸g¸Õ¤F±zªº¼gªk¡AÁÙ¬O¨S¦³¿ìªk§ì¨ì¿ù»~µøµ¡ªº¨Æ¥ó¨Ó³B²z¡C
ªþ¤WÀɮצn¤F¡C
Sheet2ªº¸ê®Æ·|ÀHµÛSheet1ªºA1~A3¨Ó°µWEB¬d¸ßÅÜ°Ê¡A¦]¦¹³]pC1~C3 copy¹L¥h§ïÅÜA1~A3®É¶i¦æWEB¬d¸ß¡C
C2ªº¼ÆÈ70645291¬O¬G·N³]p¬d¸ß¤£¨ìªº¡A·QÂǦ¹½m²ß¸I¨ìĵ§iµøµ¡n¦p¦ó³B²z¡A½Ð¥ý¶i«üÂI¤@¤U¡A·PÁÂ~
Book1.rar (8.81 KB)
Sub Ex2()
Dim t As Date
t = Time
On Error Resume Next
Worksheets("Sheet1").Activate
Range("A1:A3").Value = Range("C1:C3").Value
Do
Err.Clear
Sheet1.QueryTables(1).Refresh False
If Err.Number > 0 Then 'Web¬d¸ß ¥¢±Ñ
GoTo J:
End If
Loop While Err.Number > 0
J:
MsgBox "Game over"
End Sub |
|
Hi~
|
|
|
|
|
- ©«¤l
- 36
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 51
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-10-30
- ³Ì«áµn¿ý
- 2015-1-31
|
ÁÂÁ±zªº¦^ÂСC
¤£¹L´N¬Oµ{¦¡§ì¤£¨ìError,§_«h¥ÎOn Error Resume Next´N¦³¥Î¤F¡C
¦]¦¹¦³¹Á¸Õ¹L±zªº¤èªk¡A´N¬O¸õ¤£¨ìErrorFix,¦]¦¹´N¨S¿ìªk¥ÎErr.Number¨Ó³B²z¤F¡C
©Ò¥H¦¹¿ù»~"¦¹WEB¬d¸ß¨S¦³¶Ç¦^¸ê®Æ¡Anקï¬d¸ß¡A«ö[½T©w]¡A«ö¸ê®Æ½s¿è¦C¤Wªº¦WºÙ¤è¶ô¤¤ªº¥~³¡¸ê®Æ½d³ò¡AµM«á«ö[¥~³¡¸ê®Æ]¤u¨ã¦C¤Wªº[½s¿è¬d¸ß]¡C"ÁÙ¬OÄ~Äò²£¥Í¡AµLªk®ø°£¡C
½Ð°ÝÁÙ¦³¨ä¥Lidea¶Ü¡HÁÙ¬O«D±`ÁÂÁ±z¼·¤¾¦^ÂÐ~~ |
|
Hi~
|
|
|
|
|
- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¦^´_ 1# jewayy
§A¥i¥H©ó¿ù»~µo¥Í®É±Nµ{¦¡¾É¦V¿ù»~³B²zµ{§Ç,
©ó ¿ù»~³B²zµ{§Ç ¶}ÀY¨Æ¥ý¥ý¥[¤W¤¤Â_,
¦A©ó¨ä¤¤Åã¥Ü¥X¿ù»~¥N½X,
³Ì«á±N¸Ó¥N½Xªº³B²zµ{§Ç¥[¤J§Y¥i.
Sub Test()
On Error GoTo ErrorFix
exit Sub
ErrorFix:
MsgBox Err.Number
MsgBox Err.Description
If Err.Number = 11 Then
.
.
Err.Clear
End If
Resume
End Sub |
|
|
|
|
|
|