- ©«¤l
- 216
- ¥DÃD
- 71
- ºëµØ
- 0
- ¿n¤À
- 292
- ÂI¦W
- 0
- §@·~¨t²Î
- window xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-6-27
- ³Ì«áµn¿ý
- 2024-9-28
|
[µo°Ý] ¤u§@ªí¥t¦s®É, ¨ú®ø«ÂЦsÀÉ¥X¿ù
¥»©«³Ì«á¥Ñ missbb ©ó 2024-1-7 23:11 ½s¿è
¤U¦CCODE, §Ú±N¤u§@ªí¥t¦s·sÀÉ, ¦ý·í¦sÀɮɦ³¬Û¦P¦WºÙªºÀÉ®×, §Ú¿ï¾Ü¤£¦sÀÉ, µ{¦¡¤´·|¦sÀɦbACTIVE WORKBOOKªºPATH, ©M¥X²{¤w"¤w¸g·s¼WÀÉ®×".
§Ú·Q¦pªG¿ï¾Ü¤£«ÂЦsÀÉ, ª½±µ°h¥Xµ{¦¡, Åã¥Ü°T®§"¤w¸g¨ú®ø«ÂЦsÀÉ", ¬O¦p¦ó§ïCODE©O? ÁÂÁÂ!
TEST FILE SAVE.zip (18.08 KB)
- Sub saveactivesheet2()
- '¥Ø«e¤u§@ªí¥t¦s«ü©w¦ì¸m©MÀÉ«ö¦WºÙ
- Application.ScreenUpdating = False
- 'Application.DisplayAlerts = False
- Dim currentworkbook As Workbook
- Dim newworkbook As Workbook
- Dim currentworksheet As Worksheet
- Dim newworkbookname As String
- Dim fPath As String
- Set currentworkbook = ThisWorkbook
- Set currentworksheet = ActiveSheet
- newworkbookname = ActiveSheet.Range("S2").Value
- fPath = ActiveSheet.Range("S3").Value
-
- Set newworkbook = Workbooks.Add
- currentworksheet.Copy before:=newworkbook.Sheets(1)
- Range("A1:G100").Select
- Selection.Copy
- Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
- xlNone, SkipBlanks:=False, Transpose:=False
- Columns("H:Y").Select
- Application.CutCopyMode = False
- Selection.Delete Shift:=xlToLeft
- Range("A1").Select
- ActiveWorkbook.Save
- On Error Resume Next
- newworkbook.SaveAs Filename:=fPath & "\" & newworkbookname
- newworkbook.Close
- 'Since nothing changed on sheet, provide feedback to user
- MsgBox "¤w¸g·s¼WÀÉ®×"
- End Sub
-
-
½Æ»s¥N½X |
|