½Ð±Ðinputbox¦h«¿é¤Jªº°ÝÃD¡C
- ©«¤l
- 209
- ¥DÃD
- 43
- ºëµØ
- 0
- ¿n¤À
- 262
- ÂI¦W
- 0
- §@·~¨t²Î
- win 7
- ³nÅ骩¥»
- office 20**
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-11-3
- ³Ì«áµn¿ý
- 2017-4-16
|
½Ð±Ðinputbox¦h«¿é¤Jªº°ÝÃD¡C
¦U¦ì¦n¡A½Ð±Ð¤@Ó°ÝÃD¡G§Ú»Ýn¦bexcel¸Ì±¡A·í¨Ï¥ÎªÌÂI¿ï«ö¶s¤§«á¡A¸õ¥X¤@Óµøµ¡¡A¸ß°Ýþ¨âÃDn¹ï´«¡A¨Ï¥ÎªÌ¿é¤J¨âÓÃD¸¹¤§«á¡Aµ{¦¡·|±N¨º¨âÃDªº¬Y¨Ç¯S©wÄæ¦ì¸ê®Æ¹ï´«¡C
Ä´¦pªþ¥ó©Ò¥Ü¡A«ö¤U¤@Ó«ö¶s¡A¥X²{¤@Óµøµ¡¡A¥X²{¡§¿é¤J¹ï´«ÃD¸¹¡¨¡A¨Ï¥ÎªÌ¿é¤J¡§3¡¨©M¡§5¡¨¡A´N·|§â¡§¤@¤G¤T¥|¤¡¨(B4:F4)»P¡§¹«¤ûªê¨ßÀs¡¨(B6:F6)µ¹¹ï´«¡AÃD¸¹«hºû«ù¤£ÅÜ¡C
|
|
|
|
|
|
|
- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 256
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-26
|
¦^´_ 1# tku0216 - Private Sub CommandButton1_Click()
- Dim i%, j%, a As Range, b As Range, ar(), ar1()
- i = InputBox("¿é¤JÃD¸¹1")
- j = InputBox("¿é¤JÃD¸¹2")
- Set a = Columns("A").Find(i, lookat:=xlWhole)
- Set b = Columns("A").Find(j, lookat:=xlWhole)
- If a Is Nothing Or b Is Nothing Then MsgBox "µL¦¹ÃD¸¹": Exit Sub
- ar = a.Offset(, 1).Resize(, 5).Value
- ar1 = b.Offset(, 1).Resize(, 5).Value
- a.Offset(, 1).Resize(, 5) = ar1
- b.Offset(, 1).Resize(, 5) = ar
- End Sub
½Æ»s¥N½X |
|
¾Ç®üµL²P_¤£®¢¤U°Ý
|
|
|
|
|
- ©«¤l
- 209
- ¥DÃD
- 43
- ºëµØ
- 0
- ¿n¤À
- 262
- ÂI¦W
- 0
- §@·~¨t²Î
- win 7
- ³nÅ骩¥»
- office 20**
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-11-3
- ³Ì«áµn¿ý
- 2017-4-16
|
·PÁ¿½¤j¡A§Úè¤]¸Õ¥X¤F¤èªk
Private Sub CommandButton1_Click()
Dim q1, q2 As Integer
q1 = InputBox("¿é¤JÃD¸¹¤@") + 2 '¦]¬°§Úªº²Ä¤@ÃD¬O±q²Ä¤T¦C¶}©l
q2 = InputBox("¿é¤JÃD¸¹¤G") + 2
r1 = Range(Cells(q1, 3), Cells(q1, 15)) '±N¬YÃD²Ä3Äæ~²Ä15Ä檺¸ê®Æ¹ï´«
r2 = Range(Cells(q2, 3), Cells(q2, 15))
msgaa = MsgBox("½T»{²Ä" & q1 - 2 & "»P²Ä" & q2 - 2 & "ÃD¹ï´«?~~", 4)
If msgaa = 6 Then 'Y½T»{¹ï´«¡A«ö¤Uok
Range(Cells(q2, 3), Cells(q2, 15)) = r1
Range(Cells(q1, 3), Cells(q1, 15)) = r2
End If
End Sub |
|
|
|
|
|
|
- ©«¤l
- 209
- ¥DÃD
- 43
- ºëµØ
- 0
- ¿n¤À
- 262
- ÂI¦W
- 0
- §@·~¨t²Î
- win 7
- ³nÅ骩¥»
- office 20**
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-11-3
- ³Ì«áµn¿ý
- 2017-4-16
|
¿½¤j±z¦n¡A
§Úµo²{±zªºµ{¦¡½X¡AÀ³¦b¾¹7»P8¦æ¤§¶¡¥[¤@Óelse¡A§_«hµLªk°õ¦æ¡AÁÙ¦³¦ü¥G¨S¦³¥[¤Jend ifªº¸Ü¡Aµ{¦¡¤]µLªk°õ¦æ¡A¥i¥H½Ð°ÝÀ³¸Ó¥[¦bþ¸Ì¶Ü¡H |
|
|
|
|
|
|
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¦^´_ 4# tku0216
¥H¤U´XºØifªº¨Ï¥Î¤è¦¡,¨Ñ§A°Ñ¦Ò~
(H¤j¤jªº¼gªk~ ¨Ã¨S¦³°ÝÃDò~ )
if ±ø¥ó then
²Å¦X±ø¥ó,°õ¦æµ²ªG
end if
if ±ø¥ó then
²Å¦X±ø¥ó,°õ¦æµ²ªG
else
¤£²Å¦X±ø¥ó,°õ¦æµ²ªG
end if
if ±ø¥ó1 then
²Å¦X±ø¥ó,°õ¦æµ²ªG
elseif ±ø¥ó2 then
²Å¦X±ø¥ó2,°õ¦æµ²ªG
else
¤£²Å¦X±ø¥ó1»P¤£²Å¦X±ø¥ó2,°õ¦æµ²ªG
end if
if ±ø¥ó then exit sub |
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2012-7-27 15:24 ½s¿è
¦^´_ 3# tku0216
²Ä7¦æ¡B»P²Ä 8¦æ¬O¨âÓ¤£¦PÅ骺±Ôz¡C°£«D¬O§A±N If ±Ôz¼g¦¨¡G
If a Is Nothing Or b Is Nothing Then
MsgBox "µL¦¹ÃD¸¹"
Exit Sub
End If
¥t¥~§Ú¬°¤F¦Û§Ú´ú¸Õ¡A µy¥[קï¤F i%, j% ªº«Å§i¤è¦¡¡G
' Dim i%, j%, a As Range, b As Range, ar(), ar1()
Dim i, j, a As Range, b As Range, ar(), ar1()
i = InputBox("¿é¤JÃD¸¹1") ' i% ¦pªG¿é¤JȬ° a¡A«h·|¥X²{«¬ºA¤£²Åªº¿ù»~°T®§
j = InputBox("¿é¤JÃD¸¹2") ' j ¤¹³\¿é¤J¥ô¦ó¼ÆÈ¡B¦r¤¸©Î¦r¦ê |
|
|
|
|
|
|
- ©«¤l
- 209
- ¥DÃD
- 43
- ºëµØ
- 0
- ¿n¤À
- 262
- ÂI¦W
- 0
- §@·~¨t²Î
- win 7
- ³nÅ骩¥»
- office 20**
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-11-3
- ³Ì«áµn¿ý
- 2017-4-16
|
ÁÙ¦³·Q½Ð±Ð¡Ainputboxªº³¡¤À¡A¦pªG·QÅý¨Ï¥ÎªÌ¿é¤J«D¼Æ¦r®É¡A§YÅã¥Ü¿ù»~°T®§¦Ón¨D«·s¿é¤J¡A§Ú¬Ýºô¸ô¤Wªº°µªk¬O¥Îapplication.inputbox¤èªk¡A¦ýYn¥[¤J¨Ï¥ÎªÌ¥i¥HÂI¿ïcancel®É¡Aµ{¦¡ÀH§Y¸õ¥X¡A½Ð°ÝÀ³¸Ó¦p¦ó³B¸Ì¡H |
|
|
|
|
|
|