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

[µo°Ý] inputbox ¥X²{«¬ºA¤£²Å¦X

[µo°Ý] inputbox ¥X²{«¬ºA¤£²Å¦X

¤U­±¥N½X¦pªG«ö½T©w·|¥¿±`°õ¦æ¡A¦ý­Y«ö¤U¨ú®ø©Îesc«h·|¥X²{
°õ¦æ¶¥¬q¿ù»~ '13':
abbr_d1a0d0cacc406045f3634b6fc1f88fd1.png
«¬ºA¤£²Å¦X
¥i¥HÀ°§Ú¬Ý¤@¤U­n«ç»ò§ï¶Ü?
  1. Sub ³Ó³õ()
  2. Sub ³Ó³õ1()
  3. ' §Ö³tÁä: Ctrl+j

  4. row = ActiveCell.row '±N·í«e©Ò¦b¦æ©ñ¶iROXÅܶq¤¤
  5. ³Ó³õ¼Æ = Range("by" & row).Value '­Y¦³­×§ï¥h§ä³Ó³õ¦ì¸m¬O§_ÁÙ¦bBYÄæ
  6. If ³Ó³õ¼Æ = "" Then
  7. ³Ó³õ¼Æ = "0"
  8. End If
  9. Dim x As String
  10. x = InputBox("²Ä" & row & "¦æ" & "³Ó³õ¡G" & ³Ó³õ¼Æ & "³õ" & vbCrLf & "¬O§_³Ó§Q¨Ã¥[Áä¤Jªº¼Æ¶q¤W¥h", "½T»{µ¡¤f", 1)

  11. 'MsgBox x
  12. '¦^¶Çªº­È¡A1=½T©w 2=¨ú®ø 3=²§±`²×¤î 4=­«¸Õ 5=²¤¹L 6=¬O 7=§_
  13. If x > 0 Then
  14. Range("by" & row) = ³Ó³õ¼Æ + x
  15. ElseIf x = "" Then
  16. MsgBox "¤w¨ú®ø¾Þ§@"
  17. End If
  18. End Sub
½Æ»s¥N½X

¦^´_ 1# wei9133


Dim x As String '¤å¦r«¬ºA
x = InputBox("²Ä" & Row & "¦æ" & "³Ó³õ¡G" & ³Ó³õ¼Æ & "³õ" & vbCrLf & "¬O§_³Ó§Q¨Ã¥[Áä¤Jªº¼Æ¶q¤W¥h", "½T»{µ¡¤f", 1)
'¦^¶Çªº­È¡A1=½T©w 2=¨ú®ø 3=²§±`²×¤î 4=­«¸Õ 5=²¤¹L 6=¬O 7=§_
If Val(x) > 0 Then '±N¤å¦rÂର¼Æ­È
   Range("by" & Row) = ³Ó³õ¼Æ + x
ElseIf x = "" Then
   MsgBox "¤w¨ú®ø¾Þ§@"
End If

TOP

¦^´_ 2# ­ã´£³¡ªL

¥i¥H¥¿±`¾Þ§@¤F¡A·PÁÂ

¥t¥~·Q°Ý¤@¤U
¬°¦ó±N
Dim x As Integer '«Å§i¬°¾ã¼Æ «h·|Åܦ¨¿ù»~
ÁÙ¦³­Yx ¿é¤J­t¼Æ«h¤£°Ê§@
(µL½×x«Å§i¬°¦r¦ê©Î¾ã¼Æ³£¬O)

±NX­È¿é¤J­t¼Æ
µ{¦¡½X¨«¨ì³o
Range("by" & row) = ³Ó³õ¼Æ + x
À³¸Ó¬O ³Ó³õ¼Æ + ­t­È
¥X¨Óªº¼Æ¦rÀ³¸Ó¬O­n ³Ó³õ¼Æ - ­È¤~¹ï
  1. Dim x As Integer
  2. x = InputBox("²Ä" & row & "¦æ" & "³Ó³õ¡G" & ³Ó³õ¼Æ & "³õ" & vbCrLf & "¬O§_³Ó§Q¨Ã¥[Áä¤Jªº¼Æ¶q¤W¥h", "½T»{µ¡¤f", 1)
  3. '¦^¶Çªº­È¡A1=½T©w 2=¨ú®ø 3=²§±`²×¤î 4=­«¸Õ 5=²¤¹L 6=¬O 7=§_
  4. MsgBox x

  5. If Val(x) > 0 Then '±N¤å¦rÂର¼Æ­È
  6. Range("by" & row) = ³Ó³õ¼Æ + x
  7. ElseIf x = "" Then
  8. MsgBox "¤w¨ú®ø¾Þ§@"
  9. End If
  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 3# wei9133

InputBox «ö¨ú®ø«á, ¬O­ÓªÅ¦r²Å""
©Ò¥H Dim x As Integer ¥²µMµo¥Í¿ù»~, ¦]¬°x="", ¤£¬O¼Æ­È

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2020-1-4 10:57 ½s¿è

¦^´_ 3# wei9133

Sub ttst()
Dim x
x = Application.InputBox("²Ä" & Row & "¦æ" & "³Ó³õ¡G" & ³Ó³õ¼Æ & "³õ" & vbCrLf & "¬O§_³Ó§Q¨Ã¥[Áä¤Jªº¼Æ¶q¤W¥h", "½T»{µ¡¤f", 1)
If x & "" = "False" Then
   MsgBox "¤w¨ú®ø¾Þ§@"   '«ö¨ú®ø®É(ª`·N:¿é¤J0«ö½T©w, x¤]·|³Q©w¬°0=False, ©Ò¥H­n¥["", Åܦ¨¤å¦r»P0°µ°Ï§O)  
ElseIf x = "" Then
   MsgBox "¥¼¿é¤J¤º®e"
ElseIf IsNumeric(x) = False Then
    MsgBox "¿é¤Jªº«D¼Æ­È"
Else
    Range("by" & Row) = ³Ó³õ¼Æ + x
End If
End Sub

TOP

        ÀR«ä¦Û¦b : ¡i°±º¢¤£«e¡A²×µL©Ò±o¡j¤H³£°g©ó´M§ä©_ÂÝ¡A¦]¦Ó°±º¢¤£«e¡FÁa¨Ï®É¶¡¦A¦h¡B¸ô¦Aªø¡A¤]¤FµL¥Î³B¡A²×µL©Ò±o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD