Board logo

¼ÐÃD: §PÂ_°õ¦æ¥X²{¿ù»~ªº»yªk ? [¥´¦L¥»­¶]

§@ªÌ: t8899    ®É¶¡: 2014-7-24 08:44     ¼ÐÃD: §PÂ_°õ¦æ¥X²{¿ù»~ªº»yªk ?

§PÂ_°õ¦æ¥X²{¿ù»~ªº»yªk  
Selection.QueryTable.Refresh BackgroundQuery:=False
¤W¦æ°õ¦æ¥X²{¿ù»~ªº»yªk??  if ??????????????  then goto............................
¿ù»~µøµ¡
[attach]18750[/attach]
§@ªÌ: PKKO    ®É¶¡: 2014-8-6 14:04

¤p§Ì¤£¤~,¥uª¾¹D´X­Ó°ò¥»¤èªk

On Error GoTo F1(¦¹¦æ¼g¦b¦³¥i¯àµo¥Í¿ù»~ªº¦a¤è¤§«e§Y¥i),F1¬°¦Û¤v¹w³]ªº¦ì¸m

On Error Resume Next ªí¥Ü·í¤@­Ó°õ¦æ¶¥¬q¿ù»~²£¥Í®É¡Aµ{¦¡±±¨î¥ß¨è¨ìµo¥Í¿ù»~³¯­z¦¡±µ¤U¥hªº³¯­z¦¡¡A¦ÓÄ~Äò°õ¦æ¤U¥h¡C·í¨Ï¥Î¤@­Óª«¥óªº®É­Ô¡A½Ð¨Ï¥Î³o­Ó³¯­z¦¡¡A¦Ó¤£­n¨Ï¥Î On Error GoTo¡C

On Error GoTo 0 °±¤î²{¦bµ{§ÇùØ¥ô¦ó¤w±Ò°Êªº¿ù»~³B²zµ{¦¡¡C
§@ªÌ: PKKO    ®É¶¡: 2014-8-6 14:22

¤]¥i³z¹L¿ù»~¥N½X,¨Ó¿ï¾Ü°õ¦æ
Sub test()
'
On Error Resume Next '©¿²¤¿ù»~

Range("F2:k102").Copy '¿ù»~¥Ü½d
Range(a1).PasteSpecial '¿ù»~¥Ü½d

MsgBox "¿ù»~¥N½X¬°:" & Err.Number '¿ù»~°T®§¥N½X

Select Case Err.Number '¿ï¾Ü¿ù»~¥N½X

Case 1004
MsgBox Err.Number & "§ì¨ì§A¤F"
Case 1005
MsgBox ("©Ç©Çªº")

End Select

End Sub
§@ªÌ: t8899    ®É¶¡: 2014-8-6 14:38

¤]¥i³z¹L¿ù»~¥N½X,¨Ó¿ï¾Ü°õ¦æ
Sub test()
'
On Error Resume Next '©¿²¤¿ù»~

Range("F2:k102").Copy  ...
PKKO µoªí©ó 2014-8-6 14:22


¦p¦óª¾¹D¿ù»~ªº¸¹½X¬O´X¸¹??
§@ªÌ: PKKO    ®É¶¡: 2014-8-6 15:32

MsgBox "¿ù»~¥N½X¬°:" & Err.Number '¿ù»~°T®§¥N½X

Err.Number ´N¬O¿ù»~¥N½X




Åwªï¥úÁ{ ³Â»¶®a±Ú°Q½×ª©ª© (http://forum.twbts.com/)