ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¨D§U«Ø¥ß°j°éÀ³¥Î

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-6-4 11:53 ½s¿è
  1. Sub test()
  2.     Dim mtstr As String, Wb As Workbook
  3.     On Error Resume Next
  4.     myStr = "¿ï¨ú¸ê®ÆOK«á«ö½T©wÁä"
  5.     Set k = Application.InputBox(myStr, Type:=8)  'data½d³ò
  6.     If Err Then Exit Sub
  7.     Set Wb = Workbooks.Add    '¶}±Ò·s¬¡­¶Ã¯
  8.     ThisWorkbook.Activate
  9.     k.Copy Wb.ActiveSheet.[A3]
  10.     Set k = Nothing
  11.     Response = MsgBox("¬O§_Ä~Äò", vbYesNo)
  12.     Do Until Response <> vbYes
  13.       Set k = Application.InputBox(myStr, Type:=8) 'data½d³ò
  14.       k.Copy Wb.ActiveSheet.[A65536].End(xlUp).Offset(1, 0) '«ü©wÀx¦s®æ ¶K¤W¸ê®Æ
  15.       Set k = Nothing
  16.       Response = MsgBox("¬O§_Ä~Äò", vbYesNo)
  17.     Loop
  18. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ¦Ѯv¦^´_,¦A¶i¤@¨B½Ð±Ð¦Ñ®v
§Ú³o¼Ë¼W¥[¦æ¦C¤W¥h·|¼vÅTµ{¦¡ªº¹B§@¶Ü?(§Ú¶]°_¨ÓÁÙ¦n¥u¬O·Q¤F¸ÑÆ[©À)
ÁÙ¦³§Ú¥i¥H¦b²Ä¤@¦¸¿ï¨ú¸ê®Æ®É´N¤@°_Åã¥Ü"¦pªG­nÄ~Äò¿ï¨ú½Ð«ö[Ä~Äò]Áä"¶Ü?
·Pı§Ú³o¼Ë¦n¹³¤S¦h¤@¦¸°Ê§@
½Ð¦Ñ®vÀ°§Ú«ü¥¿

    Do Until Err.Number <> 0
     Dim Msg1, Style, Response, MyString
      Style = vbYesNo
      Msg1 = "¬O / §_ Ä~Äò¿ï¨ú¸ê®Æ"
      Response = MsgBox(Msg1, Style)
        If Response = vbYes Then    ' ­Y¨Ï¥ÎªÌ«ö¤U [¬O]¡C
      Set k = Application.InputBox(myStr, Type:=8) 'data½d³ò
      k.Copy Wb.ActiveSheet.[A65536].End(xlUp).Offset(1, 0) '«ü©wÀx¦s®æ ¶K¤W¸ê®Æ
      Set k = Nothing
            Else
             Exit Do    ' ²£¥Í¬Û¹ï¦^À³¡C
        End If
      Loop
¶}¤ß¾Ç²ß,¾Ç²ß«Ü¶}¤ß

TOP

  1. Sub test()
  2.     Dim mtstr As String, Wb As Workbook
  3.     On Error Resume Next
  4.     myStr = "¿ï¨ú¸ê®ÆOK«á«ö½T©wÁä"
  5.     Set k = Application.InputBox(myStr, Type:=8)  'data½d³ò
  6.     If Err Then Exit Sub
  7.     Set Wb = Workbooks.Add    '¶}±Ò·s¬¡­¶Ã¯
  8.     ThisWorkbook.Activate
  9.     k.Copy Wb.ActiveSheet.[A3]
  10.     Set k = Nothing
  11.     Do Until Err.Number <> 0
  12.       Set k = Application.InputBox(myStr, Type:=8) 'data½d³ò
  13.       k.Copy Wb.ActiveSheet.[A65536].End(xlUp).Offset(1, 0) '«ü©wÀx¦s®æ ¶K¤W¸ê®Æ
  14.       Set k = Nothing
  15.     Loop
  16. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤H¥Í³Ì¤jªº¦¨´N¬O±q¥¢±Ñ¤¤¯¸°_¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD