- ©«¤l
- 84
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 123
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x«n¥«
- µù¥U®É¶¡
- 2011-5-16
- ³Ì«áµn¿ý
- 2022-9-17
|
©çÁÂ~§Úªº°ÝÃDÅÞ¿èµ²ºc¤£°÷¨ãÅé³y¦¨"¸£³U¥´µ²"~^.^
ÁÙ¬O§Úµ¹¦Ñ®v¬Ý¥þ³¡ªºµ{¦¡½X ³o¼Ë¤ñ¸û¤£·|µ§»~~^.^
Sub testall()
F = Application.GetOpenFilename("Excel ÀÉ®×(*.xls),*.xls")
If F = "False" Then Exit Sub
Workbooks.Open filename:=F
y = ActiveWorkbook.Name
Dim mtstr As String, Wb As Workbook
On Error Resume Next
myStr = "¿ï¨ú¸ê®ÆOK«á«ö½T©wÁä"
Set k = Application.InputBox(myStr, Type:=8) 'data½d³ò
If Err Then Exit Sub
Set Wb = Workbooks.Add '¶}±Ò·s¬¡¶Ã¯
ThisWorkbook.Activate
k.Copy Wb.ActiveSheet.[A3]
Set k = Nothing'ÄÀ©ñª«¥ó
Response = MsgBox("¬O / §_Ä~Äò¿ï¨ú", vbYesNo)
Do Until Response <> vbYes
Windows(y).Activate'¦^¨ìì¿ï¨úÀÉ®×Ä~Äò¿ï¨ú
Set k = Application.InputBox(myStr, Type:=8) 'data½d³ò
k.Copy Wb.ActiveSheet.[A65536].End(xlUp).Offset(1, 0) '«ü©wÀx¦s®æ ¶K¤W¸ê®Æ
Set k = Nothing'ÄÀ©ñª«¥ó
Response = MsgBox("¬O / §_Ä~Äò¿ï¨ú", vbYesNo)
Loop
Application.DisplayAlerts = False'Ãö³¬°T®§Äæ
Windows(y).Close' Ãö³¬¿ï¨ú¸ê®ÆÀÉ®×
Application.DisplayAlerts = True'¶}±Ò°T®§Äæ
Application.ScreenUpdating = False
Windows(Wb).Activate 'Åã¥Ü¨ì·s¬¡¶Ã¯ÀÉ®×µe±
Windows("book1".xls).Activate '¤W±¨º¦æ¥i¥H¼g¦¨³o¼Ë¹À?
Dim nX As Long, X As Long, I As Integer'¥H¤U¬O¦b·s¬¡¶Ã¯°õ¦æ
nX = [A65536].End(xlUp).Row
For X = nX To 4 Step -1
For I = 1 To 3
Rows(X).Insert
Next
Next
bb = (nX - 1) * 4 - 1
cc = 65536
Rows(bb & ":" & cc).Clear
Columns("n") = Columns("n").Value'¥uÅã¥Üªí®æ¸ê®Æ
Application.Dialogs(xlDialogSaveAs).Show (Format(Date, "yymmdd" & "-Tilt") & "-PDA" & ".xls")'¥t¦s·s¬¡¶Ã¯ÀɦW
Windows("µ{¦¡ÀÉ").Close'Ãö³¬¥¨¶°¼¶¼gÀÉ®×(¦]¬°§Ú¨Ï¥Î¥¨¶°¤p«ö¶s«ü©w¥¨¶°¨Ó±Ò°Ê)À³¸Ó¬O¦Ñ®v»¡ªº"µ{¦¡ÀÉ"¬Ò¦A¤U¼h°õ¦æ¤£nÅã¥Üª¬ºA
End Sub
¥H¤W ³Â·Ð¦Ñ®vÀ°§Ú«ü¥¿~¾ÇµL¤îºÉ,¾i¥Í¥©Ê~^.^ |
|