(µo°Ý)WEB¬d¸ß¡A¦p¦ó¨ú®ø¸õ¥XªºÄµ§iµøµ¡
- ©«¤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
|
(µo°Ý)WEB¬d¸ß¡A¦p¦ó¨ú®ø¸õ¥XªºÄµ§iµøµ¡
¦U¦ì¥ý¶i¡A¤p§Ì¦³¨Ï¥ÎWEB¬d¸ßºô¶¸ê®Æ¡A¦ý±`±`·|¦]¬°ºô¸ô³s½u¤£¨}¡A¥X²{¥H¤U°T®§¡G
"¦¹WEB¬d¸ß¨S¦³¶Ç¦^¸ê®Æ¡Anקï¬d¸ß¡A«ö[½T©w]¡A«ö¸ê®Æ½s¿è¦C¤Wªº¦WºÙ¤è¶ô¤¤ªº¥~³¡¸ê®Æ½d³ò¡AµM«á«ö[¥~³¡¸ê®Æ]¤u¨ã¦C¤Wªº[½s¿è¬d¸ß]¡C"
¥²¶·±N³o°T®§ÂI±¼¡A¤~¯àÄ~Äò§ó·sWEB¬d¸ßªº¸ê®Æ¡A±`±`µ{¦¡¶]¤@¥b¥d¦í¡A«D±`§xÂZ¡C
¦³¸Õ¹LApplication.DisplayAlerts = False ©Î Application.EnableEvents = false©ÎOn error resume next
¤£¹L³£¨S¦³¥Î¡A½Ð¦U¦ì¥ý¶i«üÂI¤@¤U¡A·P¿E¤£ºÉ¡C |
|
|
|
|
|
|
- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 15
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-12
|
¦^´_ 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 |
|
|
|
|
|
|
- ©«¤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
- 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
|
ÁÂÁÂ¥ý¶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¦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~
|
|
|
|
|