- ©«¤l
- 561
- ¥DÃD
- 160
- ºëµØ
- 0
- ¿n¤À
- 725
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2014-9-10
- ³Ì«áµn¿ý
- 2024-8-7
|
[µo°Ý] VBAµ{¦¡¤º®eCOPY¦Ü·sEXCEL°ÝÃD¸ß°Ý
DEAR ALL ¤j¤j
1.¦p¹Ï¤@ ·s¼WEXCEL«á Âлs¤u§@ªí¤º®e¨ì·sEXCEL
1.1 ½Ð°Ý¦p¦ó copy ìexcel¤º¤§ VBA µ{¦¡¦Ü·s¶}¤§EXCEL ¤º??
2.·Ð¤£§[½ç±Ð THANKS *10000
¹Ï¤@
Sub ·s¼WEXCEL()
Range("A1").Select
Application.DisplayAlerts = False 'Ãö
Workbooks.Add
ChDir "\\Pcbfs02\C701\²£³]¦·|·|ij°O¿ý¿é¤J¨t²Î"
ActiveWorkbook.SaveAs Filename:= _
"\\Pcbfs02\C701\²£³]¦·|·|ij°O¿ý¿é¤J¨t²Î\¦U°Ï¦·|DATA\PD KPI (ÁZ®Ä)" & Sheet1.Range("AG1") & " .xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveWindow.Close
Range("A1").Select
End Sub
Sub Âлs¶g¸ê®Æ®w()
'¥þ±©ÊÅܧó¦WºÙ¥i¥Î½s¿è¤º¤§¨ú¥N¥\¯à¤@¦¸ALL¸m´«
Workbooks.Open Filename:="\\Pcbfs02\C701\²£³]¦·|·|ij°O¿ý¿é¤J¨t²Î\¦U°Ï¦·|DATA\PD KPI (ÁZ®Ä)" & Sheet1.Range("AG1") & " .xls" '»Ý¨DEXCEL ADDRESS-¦Û¦æÅܧó.
Windows("PD KPI (ÁZ®Ä).xls").Activate '¦ÜìÂлsPDM¸ê®Æ®w.xlsÀÉ-¦WºÙ¨Ì»Ý¨DÅܧó
Sheets("¦·|DATA").Cells.Copy 'COPY TBDD2060 ALL Àx¦s®æ-¦WºÙ¨Ì»Ý¨DÅܧó
Windows("PD KPI (ÁZ®Ä)" & Sheet1.Range("AG1") & " .xls").Activate '¦Ü´ú¸Õªí³æ.xlsÀÉ-¦WºÙ¨Ì»Ý¨DÅܧó
Sheets("SHEET1").Select '¦ÜTBDD2060¤u§@ªí-¦WºÙ¨Ì»Ý¨DÅܧó
Range("A1").Select '¦ÜA1Àx¦s®æ
ActiveSheet.Paste 'Âлs
Windows("PD KPI (ÁZ®Ä).xls").Activate '¦ÜÂлsPDM¸ê®Æ®w.xlsÀÉ-¦WºÙ¨Ì»Ý¨DÅܧó
Sheets("¦·|DATA").Select '¦Ü«Ê±¤u§@ªí-¦WºÙ¨Ì»Ý¨DÅܧó
Range("A1").Select '¦ÜA1Àx¦s®æ
Windows("PD KPI (ÁZ®Ä)" & Sheet1.Range("AG1") & " .xls").Activate '¦Ü´ú¸Õªí³æ.xls-¦WºÙ¨Ì»Ý¨DÅܧó
Sheets("Sheet1").Select '¦Ü¥Ø¿ý"¤u§@ªí-¦WºÙ¨Ì»Ý¨DÅܧó
Range("A1").Select '¦ÜA1Àx¦s
Application.DisplayAlerts = False 'Ãö
ActiveWorkbook.Save
ActiveWindow.Close
End Sub |
|