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

[µo°Ý] Application.InputBox

[µo°Ý] Application.InputBox

Dim rng As Range
    Set rng = Application.InputBox("½Ð¥Î·Æ¹«¿ï", Type:=8)
RNG.COUNT ·|¶Ç¦^¿ï¤F´X­ÓÀx¦s®æ
°²¦p¿ï¾Ü3­ÓÀx¦s®æ,³o¤T­ÓÅܼƦU¦p¦óªí¥Ü?(·Q¤À¶}¨Ï¥Î)

Set A1 = rng(1)
Set A2 = rng(2)
Set A3 = rng(3)

TOP

Set A1 = rng(1)
Set A2 = rng(2)
Set A3 = rng(3)
bobomi µoªí©ó 2014-10-31 22:03


Sub MA3333()
    Dim rng, A1, A2, A3, A4
    Set rng = Application.InputBox("½Ð¥Î·Æ¹«¿ï", Type:=8)
Set A1 = rng(1)
Set A2 = rng(2)
Set A3 = rng(3)
Set A4 = rng(4)
' °²¦p§Ú¨Ì§Ç¿ï¾Ü $I$13,$I$17,$J$14,$J$19   4­Ó
   MsgBox A3.Address '(¶Ç¦^²Ä¤T­Ó)
end sub
¦^³ø  $I$15 ¤£¹ï°Ú ,À³¸Ó¬O $J$14,§Ú¨S¿ï $I$15 °Ú ??

TOP

Sub MA3333()
    Dim rng, A1, A2, A3, A4
    Set rng = Application.InputBox("½Ð¥Î·Æ¹«¿ï", Type ...
t8899 µoªí©ó 2014-11-1 06:37



¨Sª`·N¨ìÁÙ¦³¸õµÛ¿ïªº


   Dim rng
   Set rng = Application.InputBox("½Ð¥Î·Æ¹«¿ï", Type:=8)

ReDim A1(1 To rng.Count)
Dim k As Long
For Each r In rng
    k = k + 1
    Set A1(k) = r
    Msgbox A1(k).Address
Next

TOP

Sub MA3333()
    Dim rng, A1, A2, A3, A4
    Set rng = Application.InputBox("½Ð¥Î·Æ¹«¿ï", Type ...
t8899 µoªí©ó 2014-11-1 06:37

§ï³o¼Ë¤]¥i¥H:
Set A1 = rng.Areas(1)
Set A2 = rng.Areas(2)
Set A3 = rng.Areas(3)
Set A4 = rng.Areas(4)

TOP

§ï³o¼Ë¤]¥i¥H:
Set A1 = rng.Areas(1)
Set A2 = rng.Areas(2)
Set A3 = rng.Areas(3)
Set A4 = rng.A ...
luhpro µoªí©ó 2014-11-1 22:53


thanks

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-11-2 08:43 ½s¿è
thanks
bobomi µoªí©ó 2014-11-2 00:00

§Ú¸Õ¹L  ¤U­±¤]·|·Ó§A©Ò¿ïªº¶¶§Ç¨Ì§Ç³B²z,¥u¬OµLªkª¾¹D­Ó§OÅܼƪº¦WºÙ  
   Dim ZZ, rng
    Set rng = Application.InputBox("½Ð¥Î·Æ¹«¿ï" & [A10], Type:=8)
For Each ZZ In rng
MsgBox ZZ.Address
Next

TOP

§Ú¸Õ¹L  ¤U­±¤]·|·Ó§A©Ò¿ïªº¶¶§Ç¨Ì§Ç³B²z,¥u¬OµLªkª¾¹D­Ó§OÅܼƪº¦WºÙ  
   Dim ZZ, rng
    Set rng = ...
t8899 µoªí©ó 2014-11-2 08:38


§A¥Î luhpro ¼gªº³o­Ó§a
Set A1 = rng.Areas(1)
Set A2 = rng.Areas(2)
Set A3 = rng.Areas(3)
¤ñ¸û¤è«K

TOP

§Ú¸Õ¹L  ¤U­±¤]·|·Ó§A©Ò¿ïªº¶¶§Ç¨Ì§Ç³B²z,¥u¬OµLªkª¾¹D­Ó§OÅܼƪº¦WºÙ  
   Dim ZZ, rng
    Set rng = ...
t8899 µoªí©ó 2014-11-2 08:38

§Ú·Q¨ìªº¦³¨âºØ¤èªk¥i¥H¹ê²{,
¤£¹L­n¬Ý§A«áÄòªº»Ý¨D¨M©w­n¥Î­þºØ:
1. »Ý­n§ì©Ò¿ï¨úÀx¦s®æªº¦ì§}¦r¦ê:
  1. Sub MA3333()
  2.     Dim rng, a$(), i%
  3. On Error Resume Next
  4.     Set rng = Application.InputBox("½Ð¥Î·Æ¹«¿ï", Type:=8)
  5.     ReDim a(0)
  6.     For i = 1 To rng.Count
  7.       ReDim Preserve a(i)
  8.       a(i) = rng.Areas(i).Address
  9.       MsgBox "§A¿ï¾Üªº²Ä " & i & "­ÓÀx¦s®æ¦ì§}¬° :  " & a(i)
  10.     Next
  11. On Error GoTo 0
  12. End Sub
½Æ»s¥N½X
2. »Ý­n§ì©Ò¿ï¨úªºÀx¦s®æª«¥ó:
  1. Sub MA3333()
  2.     Dim rng, i%
  3. On Error Resume Next
  4.     Set rng = Application.InputBox("½Ð¥Î·Æ¹«¿ï", Type:=8)
  5.     For i = 1 To rng.Count
  6.       MsgBox "§A¿ï¾Üªº²Ä " & i & "­ÓÀx¦s®æ¦ì§}¬° :  " & rng.Areas(i).Address
  7.     Next
  8. On Error GoTo 0
  9. End Sub
½Æ»s¥N½X
·|¥[ On Error Resume Next ¬O¦]¬°­Y¨Ï¥ÎªÌ¤@¦¸¿ï¤F¶W¹L¤@­ÓÀx¦s®æ®É,
«á­±·|µo¥Í¿ù»~.

¦]¬°­Y¦ì§}¬° $A$1:$B$1 ¦¹Ãþ®æ¦¡®É,
count ·|ºâ¨â­Ó¦ì§},
¦ý areas «h¥uºâ¤@­Ó¦ì§},
³Ì«á i ·|¤j©ó°}¦C³Ì¤j¯Á¤Þ­È.

TOP

§Ú·Q¨ìªº¦³¨âºØ¤èªk¥i¥H¹ê²{,
¤£¹L­n¬Ý§A«áÄòªº»Ý¨D¨M©w­n¥Î­þºØ:
1. »Ý­n§ì©Ò¿ï¨úÀx¦s®æªº¦ì§}¦r¦ê:2. ...
luhpro µoªí©ó 2014-11-2 10:23

·PÁ¨â¦ì«ü¾É!

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD