¨C¹j¦h¤ÖÄæ´¡¤J¦h¤ÖÄæµ{¦¡¿ù»~»ÝÀ°¦£
- ©«¤l
- 113
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 149
- ÂI¦W
- 0
- §@·~¨t²Î
- xp & vista
- ³nÅ骩¥»
- 2003 & 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-12-29
- ³Ì«áµn¿ý
- 2020-5-22
|
¨C¹j¦h¤ÖÄæ´¡¤J¦h¤ÖÄæµ{¦¡¿ù»~»ÝÀ°¦£
¦³¤@Óµ{¦¡¡@¬O§Æ±æ¥¦¯à¨C¹j¦h¤ÖÄæ´¡¤J¦h¤ÖÄæ
¦ý¦³¤@Ó¦a¤è¤@ª½¥X²{¿ù»~ (Mark ¬õ¦â³B¡^
§Æ±æ¯à°÷À°§Ú¬Ý¤@¤U¡@ÁÂÁ¡ã
µ{¦¡¦p¤U¡G
Sub ´¡¤JÄæ()
Dim BeginCol As Long, AA As Long, Temp As String, InsCol As Long
Dim myRow As Integer, tempCol As Long
myRow = Selection.Row
BeginCol = Selection.Column
Temp = InputBox("¹j´XÄæ")
If IsNumeric(Temp) Then AA = CLng(Temp) Else Exit Sub
Temp = InputBox("´¡¤J´XÄæ")
If IsNumeric(Temp) Then InsCol = CLng(Temp) Else Exit Sub
Application.ScreenUpdating = False
Do While True
tempCol = Range(Cells(myRow, 255), Cells(myRow, 255)).End(xlToLeft).Column
If tempCol < (BeginCol + AA) Then Exit Do
BeginCol = BeginCol + AA
Columns(BeginCol & ":" & BeginCol + InsRow - 1).Insert Shift:=xlToRight
BeginCol = BeginCol + InsCol
Loop
Application.ScreenUpdating = True
End Sub |
|
|
|
|
|
|
- ©«¤l
- 113
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 149
- ÂI¦W
- 0
- §@·~¨t²Î
- xp & vista
- ³nÅ骩¥»
- 2003 & 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-12-29
- ³Ì«áµn¿ý
- 2020-5-22
|
©Ò¥H§Ú¸Ó±q¤@¶}©lªº©w¸q´N¶}©l§ï¬O¶Ü¡H
ÁÙ¬O¥i¥H§â Columns ¥Î§Oªº°Ñ¼Æ°µ¨ú¥N©O¡H
ÁÂÁ¡ã |
|
|
|
|
|
|
- ©«¤l
- 825
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 905
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-8-18
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2012-9-19 21:34 ½s¿è
©Ò¥H§Ú¸Ó±q¤@¶}©lªº©w¸q´N¶}©l§ï¬O¶Ü¡H
ÁÙ¬O¥i¥H§â Columns ¥Î§Oªº°Ñ¼Æ°µ¨ú¥N©O¡H
ÁÂÁ¡ã
Genie µoªí©ó 2012-9-19 17:08 ![](https://forum.twbts.com/images/common/back.gif)
·N«ä¬O¥H Columns ¨Óªí¥Ü¦hÓÄæ¦ì®É,
«á±n©ñªí¥ÜÄæ¦ì¦WºÙªº^¤å¦r¦Ó¤£¯à©ñ¼Æ¦r, (¼Æ¦r¬Oªí¥Ü¦h¦C®É¦b¥Îªº)
¤£¹L³oË¥i¥H¥Î Chr(64 + Äæ¦ì§Ç¸¹) ªº¤è¦¡¨ÓÂà´«.
Âà´««áªºµ{¦¡¥i¥H¦p¤U :
Columns(Chr(64 + BeginCol) & ":" & Chr(64 + BeginCol + InsCol - 1)).Insert Shift:=xlToRight
§Aµ{¦¡¤¤¤W¦CÀ³¬O InsCol ¦Ó«D InsRow ³á.
¥t tempCol = Range(Cells(myRow, 255), Cells(myRow, 255)).End(xlToLeft).Column
¥i¥H²¤Æ¬° : tempCol = Cells(myRow, 255).End(xlToLeft).Column |
|
|
|
|
|
|
- ©«¤l
- 227
- ¥DÃD
- 3
- ºëµØ
- 1
- ¿n¤À
- 273
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-3-22
- ³Ì«áµn¿ý
- 2013-1-29
|
¤£¦n·N«ä¡A´¡Óªá
Chr(64 + BeginCol)¦bÄæ¦ì¤j©ó26®É´N¥X²{°ÝÃD¤F
Ó¤H«Øijªº¤èªk¬O- Cells(1, BeginCol).Resize(, InsCol).EntireColumn.Insert
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 825
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 905
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-8-18
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2012-9-19 22:14 ½s¿è
¦^´_ 5# chin15
±à...
³oÓ°Q½×°Ï¨t²Î¦n¹³¨S¦³Ãþ¦ü "¯d¨¥" ªº¥\¯à
©Ò¥H¥u¯à¥Î¦^¤åªº¤è¦¡¨Ó¦^À³Åo.
--- ¥H¤U¬O¦^À³ªº¤º®e ---
¶â...
§A´£¨Ñªº¤è¦¡¤ñ§Úªº§¹µ½¦h¤F,
ȱo°O¤U¨Ó.
PS èèµo¤FÓ³ø§i, ¥H¬°¬O¯d¨¥¥\¯à,
¦ý¤Sµo²{¦n¹³°Q½×¦ê¬Ý¤£¨ì "³ø§i" ªº¤º®e, ©Ò¥H½ÐºÞ²zªÌ©¿²¤¸Ó³ø§i. |
|
|
|
|
|
|
- ©«¤l
- 113
- ¥DÃD
- 31
- ºëµØ
- 0
- ¿n¤À
- 149
- ÂI¦W
- 0
- §@·~¨t²Î
- xp & vista
- ³nÅ骩¥»
- 2003 & 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-12-29
- ³Ì«áµn¿ý
- 2020-5-22
|
ÁÂÁ luhpro ©M chin15 ¸Ñ¨M¤F§Úªº°ÝÃD
¦P®É¤]¾Ç¨ì¤F·sªº¥Îªk
«D±`·PÁ¡ã |
|
|
|
|
|
|