ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó¨Ï¥ÎVBA¤@Áä¥t¦s·sÀÉ?

[µo°Ý] ¦p¦ó¨Ï¥ÎVBA¤@Áä¥t¦s·sÀÉ?

½Ð°Ý¦p¦ó¼g¤@­ÓVBA¥¨¶°¡A¯à§â "¤u§@ªíA" ªºA2:F56½d³ò ©M "¤u§@ªíB" ªºA2:F50½d³ò¡A¥t¦sexcelÀɦb¬Y­Ó«ü©w¸ô®|¤W¡AÀɦW©R¦W¤è¦¡´N¥H "§Y®É¤é´Á®É¶¡+¤u§@ªíCªºK3Äæ¦ì¤º®e" ¨Ó©R¦W¡C


¨D¸Ñ¤j®v¡A·PÁ¡C

¦^´_ 1# RCRG


½Ðªþ¤WÀÉ®×

TOP

Sub test()

spath = "D:\test\"
mybook = ActiveWorkbook.Name
Sheets("¤u§@ªíA"").Range("A2:F56").Copy
Sheets.Copy

Workbooks(mybook).Sheets("¤u§@ªíB").Range("A2:F50").Copy ActiveWorkbook.Sheets(1).Range("C1")
ActiveWorkbook.SaveAs spath & Format(Now(), "YYYYMMDDhhmmss") & Workbooks(mybook).Sheets("¤u§@ªíC").Range("K3")

End Sub

TOP

¦^´_ 1# RCRG



³o¬O¤å~~~~

«ü©w½d³òCopy¥X¨Ó¥t¦sÀɮסAÀx¦s®æÄæ¦ì&¤u§@ªí¦WºÙ¨S§ïÅÜ

Sub EX()
iPath$ = "C:\Users\user\Desktop\"  '«ü©w¸ô®|
NewName$ = Format(Now, "yyyymmddhhmmss") & CStr([¤u§@ªíC!K3])
Set ibook = ActiveWorkbook
With Workbooks.Add: ibook.Activate
  [¤u§@ªíA!A2:F56].Copy .Sheets(1).[A2]: .Sheets(1).Name = "¤u§@ªíA"
  [¤u§@ªíB!A2:F50].Copy .Sheets(2).[A2]: .Sheets(2).Name = "¤u§@ªíB"
  .SaveAs iPath & NewName: .Close True
End With: Set ibook = Nothing
End Sub
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD