- ©«¤l
- 913
- ¥DÃD
- 150
- ºëµØ
- 0
- ¿n¤À
- 1089
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- office 2019
- ¾\ŪÅv
- 50
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-8-28
- ³Ì«áµn¿ý
- 2023-7-19
|
±z¦n,
§Ú±Nµ{¦¡×¥¿¬°¥H¤U,
1.. VBAµ{¦¡½Ð©ñ¦bVBA³øªí«ü¥O.xlsm Àɮפ¤
2.. ±NERP_Data.xlsxªº®w¦s.sheet½Æ»s¨ì ½LÂIªí.xlsx (¥ýclear,¦A¶K¤WÈ)
3.. ¦sÀÉ®ÉY¤w¦³½LÂIªíªºÀɮצs¦b®É,¤£Âл\,¦Û°Ê¦s¬°"½LÂIªí_YYYYMMDD.HHMM
4.. ¨Ï¨t²Î¤£°µ¥ô¦ó¸ß°Ý,¤£¦sÀɪ½±µÃö³¬ERP_Data.xlsx
5.. copy ½LÂIªí.sheet G¡BAC¡BAD¡BAH:AJ¡BAL¡BAMÄæ³s¦PªíÀY (Àx¦s®æ®æ¦¡,Äæ¼e³£n¬Û¦P)¨ìLabel.sheet,±qBÄæ¶}©l¨Ì§Ç¶K¤W¨Ã¥[¤W¿z¿ïÁä
6.. A2¤@ª½¨ì¸ê®Æ³Ì©³³¡¡Akey¤J1.2.3µ¥®t¼Æ¦C,¨Ã¥B¤å¦r¥ª¥k¸m¤¤
7.. ½Æ»s¤@ÓLabel.sheet>>Label (2)
¥H¤Uªº°Ê§@¬Ò¦bLabel (2).sheet
8.. Label (2) HÄæ¿z¿ï¥X=0ªº¸ê®Æ¨Ã§R°£
9.. Label (2) EÄæ¿z¿ï¥X¤£µ¥©ó1ªº¸ê®Æ¨Ã§R°£
10.. IÄæ©Ò¦³µ¥©ó"V"ªºÄæ¦ì,¦b¤U¤è¼W¥[¤G¦C(¾ã¦C¦¡)ªÅ¥Õ
11.. ¨Ã±NIÄæµ¥©ó"V"ªº¦P¤@¦CªºDÄæÀx¦s®æ¤º®e,§¹¥þcopy¨ì·s¼WªÅ¥Õ¦Cªº²Ä¤@¦CCÄæ¦ì¸m,¨Ã¥B¤å¦r¥ª¥k¸m¤¤
12.. Àx¦sÀÉ®×,¤£Ãö³¬
½LÂIªí¤Î¼ÐÅÒ.part1.rar (500 KB)
½LÂIªí¤Î¼ÐÅÒ.part2.rar (500 KB)
½LÂIªí¤Î¼ÐÅÒ.part3.rar (427.43 KB)
¦³¤@³¡¥÷ªºµ{¦¡¤w¸g°µ¦n¤F¡A¦ý...
1) ¹B§@¤£¥¿±`,ÀÉ®×µLªk¦Û¦æ¶}±Ò
2) 5~12µLªk¥Î¿ý»s¥¨¶°¤è¦¡§@·~(¦]¬°¸ê®Æ¤£¬O©T©w¼Ò¦¡ªº,±`¦³¼W´î),¯à°÷À°¦£¼g«áÄòµ{¦¡¶Ü¡H- Sub ½LÂIªí()
- Dim Msg As Boolean, W As Workbook, Wb As Workbook 'W As "¨Ó·½ÀÉ" Wb As "¥ØªºÀÉ"
- 'Boolean «¬ºAªº¹w³]Ȭ° False
- '*******Workbooks ¶}±Òªº¬¡¶Ã¯ª«¥ó¶°¦X****
- For Each W In Workbooks
- If UCase(W.Name) = UCase("ERP_Data.xlsx") Then
- Msg = True 'Àɮפw¶}±Ò
- Exit For
- End If
- Next
- '*****************************************¨Ó·½ÀÉ
- If Msg = True Then 'Àɮפw¶}±Ò
- Set W = Workbooks("ERP_Data.xlsx")
- Else 'Àɮש|¥¼¥´¶}®É
- Set W = Workbooks.Open("Q:\00_¬ì¼Ý\¥X³f¤å¥ó³sµ²\ERP_Data.xlsx")
- End If
- '*******Workbooks ¶}±Òªº¬¡¶Ã¯ª«¥ó¶°¦X****¥ØªºÀÉ
- If Msg = True Then 'Àɮפw¶}±Ò
- Set Wb = Workbooks("½LÂIªí.xlsx")
- Else 'Àɮש|¥¼¥´¶}®É
- Set Wb = Workbooks.Open("Q:\00_¬ì¼Ý\¥X³f¤å¥ó³sµ²\½LÂIªí.xlsx")
- End If
- '*****************************************½Æ»s¨ì·sªº¬¡¶Á¡
- With W.Sheets("®w¦s")
- Set xRng = .UsedRange 'UsedRange->¤u§@ªí©Ò¨Ï¥Îªº¥þ³¡½d³ò
- xRng.Copy '½Æ»s
- End With
- With Wb.Sheets("½LÂIªí")
- .Range("A1").PasteSpecial xlPasteValues '¿ï¾Ü©Ê¶K¤W
- '.Range("A1").Paste '§¹¥þ¶K¤W(µL®Ä)
- Application.CutCopyMode = False '***¤£³B©ó°Å¤U©Î½Æ»s¼Ò¦¡
- End With
- W.Close False 'Ãö³¬ÀÉ®×(¤£·|°Ý¬O§_¦sÀÉ)
- '*****************************************
- With Wb.Sheets("½LÂIªí")
- ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=2 '¥´¶}ÁôÂøs²Õ
- 'Wb.Save
- End With
- End Sub
½Æ»s¥N½X |
|