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

N=¹ï¸Ü®ØÂI¿ïªº¦C¼Æ

N=¹ï¸Ü®ØÂI¿ïªº¦C¼Æ

¦U¦ì«e½ú§A­Ì¦n!!   
         °ÝÃD¦pªþÀÉ»¡©ú
         ½Ðª¾¹Dªº«e½ú,¤£§[½ç±ÐÁÂÁ¦A¤T!!

LeoV77.rar (9.37 KB)

¥»©«³Ì«á¥Ñ luhpro ©ó 2013-10-13 22:06 ½s¿è

¦^´_ 1# myleoyes
¨Ì¾Ú InputBox ªº»¡©ú,
³o¸Ì Z ´N¬O©Ò¿ï Range ªº°Ñ·Ó, ¬G¦Ó Z.Row ´N¬O§A­nªº¦C­ÈÅo.
  1. Sub AA()
  2.     Dim Z As Range
  3.        [A1:C1] = ""
  4.     Set Z = Application.InputBox("½Ð¿ï¨ú¸ê®Æ", "        ¨Ó·½¼Æ¾Ú", Type:=8)
  5.         If Z <= 0 Then Exit Sub
  6.         N = Z.Row 'N = ActiveCell.Row
  7.         [$D$1] = "=" & Z & "-" & N
  8.         [D1].Select
  9. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# luhpro
«e½ú!ÁÂÁÂ!!N= Z.Row¤p§Ì¦³¸Õ¹L
         °ÝÃD¬OIf Z <= 0 The Exit Sub
         §ï¬°If Z <= 0 Then GoTo ag
         ·í¹ï¸Ü®Ø¿ï¾Ü¨ú®ø®É
        µ{¦¡·|¿ù»~424¤£ª¾¬°¦ó?
         ½Ð«e½ú¤£§[¦A½ç±ÐÁÂÁ¦A¤T!!

TOP

¦^´_ 3# myleoyes
¨º¬O¦]¬°«ö¨ú®ø®É InputBox ªº¶Ç¦^­È¬° "False",
¦Ó«DÀx¦s®æªº°Ñ·Ó,
¦ÛµM´NµLªk«ü©wµ¹ Z(Type ¬° Range) ¤F. (µo¥Í¿ù»~¥N½X 424 : ¦¹³B»Ý­nª«¥ó)

³o¥i¥H³z¹L¿ù»~³B²z¨Ó¸Ñ¨M:
  1. Sub AA()
  2.   Dim Z As Range
  3.    
  4. On Error GoTo ErrorAA
  5.   [A1:C1] = ""
  6.   Set Z = Application.InputBox("½Ð¿ï¨ú¸ê®Æ", "        ¨Ó·½¼Æ¾Ú", Type:=8)
  7.   If Z <= 0 Then Exit Sub
  8.   N = 3 'N = ActiveCell.Row
  9.   [$D$1] = "=" & Z & "-" & N
  10.   [D1].Select
  11. On Error Resume Next
  12. Exit Sub
  13.         
  14. ErrorAA:
  15.   If Err.Number = 424 Then
  16.     Exit Sub
  17.   Else
  18.     MsgBox ("µo¥Í¿ù»~, ¿ù»~¥N½X : " & Err.Number & "  ¿ù»~­ì¦] :" & Err.Description)
  19.     Resume Next
  20.   End If
  21. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# luhpro
«e½ú!
        ÁÂÁÂ!!¤p§Ì­×§ï¦p¤U
  Sub AA()
  Dim Z As Range
  On Error Resume Next
  [A1:C1] = ""
ag:
  Set Z = Application.InputBox("½Ð¿ï¨ú¸ê®Æ", "        ¨Ó·½¼Æ¾Ú", Type:=8)
  If Z <= 0 Then GoTo ag
   N = Z.Row
  [$D$1] = "=" & Z & "-" & N
  [D1].Select
End Sub

TOP

        ÀR«ä¦Û¦b : ½_ÁJµ²±o¶V¹¡º¡¡A¶V·|©¹¤U««¡A¤@­Ó¤H¶V¦³¦¨´N¡A´N­n¶V¦³Á¾¨Rªº¯ÝÃÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD