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

[µo°Ý] ½Æ»s¯S©wexcelÀÉ®×

[µo°Ý] ½Æ»s¯S©wexcelÀÉ®×

ÁV¿|~§Ú¤S¨Ó¤F¡A¬ã¨s¥dÃö¡C

¤½¥qERP¨t²Î·|¤U¸ü¤@­ÓEXCELÀɮסA§Úªº±b¸¹µn¤J«á¦pªG¤U¸ü¸Ó¸ê®Æ¡A
²Ä¤@¦¸·|Âà¥XÀɦWLink.xlsªº¸ê®ÆÀÉ
²Ä¤G¦¸·|Âà¥XÀɦWLink(1).xlsªº¸ê®ÆÀÉ
²Ä¤T¦¸·|Âà¥XÀɦWLink(2).xlsªº¸ê®ÆÀÉ
¦pªG§Ú±b¸¹¤@ª½¨S¦³µn¥X¡A²ÄN¦¸´N·|Âà¥XÀɦWLink(N-1).xlsªº¸ê®ÆÀÉ
¤§«á§Ú·|±NLink.xlsªº¤À­¶PickListLinkPDA¤â¤u½Æ»s¶K¤W¦Ü¥DÀÉtest1.xlsmªº¤À­¶raw¡AµM«á¶}©l°õ¦æVBA³B²z¸ê®Æ¡C

¤§«e§Ú¬O½Ð±Ð¡A¦p¦ó¥ÎVBA©ótest1.xlsm°õ¦æ§¹°Ê§@¡A¤]¤@¨Ö±NLink(N-1).xlsÃö³¬(¤£¥Î¦sÀÉ)¡A¤]Àò±o¸Ñ¨M¡C

¥Ø«e§Ú¬O·Q¥ÎVBA¤@¶}©l´N¥h§äLink(N-1).xlsªº¤À­¶raw½Æ»s¨Ó·½¡A°õ¦æ§Úªºµ{§Ç¡A³Ì«áÃö³¬Link(N-1).xlsÀɮסC

¥Ø«e¹J¨ìªº·s°ÝÃD¬O¤W­±¬õ¦â¦r¦ê¡A½Ð°Ý­n¦p¦ó¼¶¼g³o³¡¤Àªºµ{§ÇÅýVBA½Æ»s¨Ó·½Link(N-1).xlsªº¤À­¶PickListLinkPDA¡C
¤U­±¬O§Ú«÷´ê¼g¥XªºVBA¡A¥i¬O¶}ÀY´N¥d¦íµLªk°õ¦æ¡C

Sub step01()
    Dim wb As Workbook
    For Each wb In Workbooks
            If LCase(wb.Name) Like "Link*.xls*" Then
                Workbooks(wb).Worksheets("PickListLinkPDA").Columns("A:AU").Cells.Copy '½Æ»sLink(N-1).xlsx¤¤ªºPickListLinkPDAªí³æ½Æ»s
                Workbooks("test1.xlsm").Worksheets("raw").Select  '¶K¦Ü¥DÀÉtest1.xlsm¤¤ªºrawªí³æ
                Range("A1").Select
                ActiveSheet.Paste
        End If
        
    a = Cells(13, 5)
    If Len(a) >= 28 Then
        Worksheets("raw").Cells(13, 5).Font.Name = "Arial"
        Worksheets("raw").Cells(13, 5).Font.Size = 35
        Worksheets("raw").Cells(13, 5).Font.FontStyle = "²ÊÅé"
    Else

        Worksheets("raw").Cells(13, 5).Font.Name = "Arial"
        Worksheets("raw").Cells(13, 5).Font.Size = 48
        Worksheets("raw").Cells(13, 5).Font.FontStyle = "²ÊÅé"
    End If  

    For Each wb In Workbooks
            If LCase(wb.Name) Like "Link*.xls*" Then wb.Close 0
    Next
   
End Sub

Downloads.rar (38.63 KB)

¦^´_ 1# pointchi

¤£ª¾§Úªº²z¸Ñ¦³µL¿ù»~¡A±zªº»Ý¨D¦p¤U¡A½Ð½T»{¡AÁÂÁÂ

³vµ§¶}±Ò¦P¸ê®Æ§¨¦³Link xxªºÀÉ®×--> ½Æ»s¸ê®Æ¨ìTEST1ÀÉ®×Range?? --> Ãö³¬Link xxÀÉ®×-->¦b¶}±Ò¤U¤@µ§Link xx-->....

½Æ»s¸ê®Æ½d³ò??
¶K¨ìTEST1ªº­þ¸Ì??

TOP

¥»©«³Ì«á¥Ñ pointchi ©ó 2021-12-22 22:54 ½s¿è

¦^´_ 2# samwang

³vµ§¶}±Ò¦P¸ê®Æ§¨¦³Link xxªºÀÉ®×(Àɮ׬O³B©ó¶}±Òª¬ºA)-->(°õ¦æ§Ú¦Û¤v½s¼gªºµ{§Ç) -->½Æ»s¸ê®Æ¨ìTEST1ÀÉ®×Range?? (¦p¤U»¡©ú)--> Ãö³¬Link xxÀÉ®×(Ãö³¬«á¦P®É°±¤îµ{§Ç¡A¥u°µ¤@½ü°j¡A¤£¦AÄ~Äò)

S¤j±z¦n¡A»¡©ú¦p¤U¡G

¥u¦³¤@­ÓLink XX.xls(°õ¦æµ{§Çªº·í¤U¬O¤w¶}±Òª¬ºA)¡A½Æ»s¸Ì­±ªº¤À­¶PickListLinkPDAªºÄæ¦ìA¦ÜAUªº¸ê®Æ¡A
¶K¦Ü¥DÀÉTEST1.xlsmªº¤À­¶raw¡AA1Àx¦s®æ¶K¤W¡C

    Dim wb As Workbook
    For Each wb In Workbooks
        If LCase(wb.Name) Like "Link*.xls*" Then
            Workbooks(wb).Worksheets("PickListLinkPDA").Columns("A:AU").Cells.Copy '½Æ»sLink(N-1).xlsx¤¤ªºPickListLinkPDAªí³æ½Æ»s
            Workbooks("test1.xlsm").Worksheets("raw").Select '¶K¦Ü¥DÀÉtest1.xlsm¤¤ªºrawªí³æ
            Range("A1").Select
            ActiveSheet.Paste
        End If
(¥D­n¬O¤W­±³o¬qµ{§Ç¥X²{µ{§Ç¿ù»~ªº²§±`)

µM«á°õ¦æ
a = Cells(13, 5)
    If Len(a) >= 28 Then
        Worksheets("raw").Cells(13, 5).Font.Name = "Arial"
        Worksheets("raw").Cells(13, 5).Font.Size = 35
        Worksheets("raw").Cells(13, 5).Font.FontStyle = "²ÊÅé"
    Else

        Worksheets("raw").Cells(13, 5).Font.Name = "Arial"
        Worksheets("raw").Cells(13, 5).Font.Size = 48
        Worksheets("raw").Cells(13, 5).Font.FontStyle = "²ÊÅé"
    End If

±µµÛÃö³¬Link XX.xls(ª½±µÃö³¬¡A¤£¥Î¦sÀÉ)
    For Each wb In Workbooks
            If LCase(wb.Name) Like "Link*.xls*" Then wb.Close 0
    Next

TOP

¦^´_  samwang

³vµ§¶}±Ò¦P¸ê®Æ§¨¦³Link xxªºÀÉ®×(Àɮ׬O³B©ó¶}±Òª¬ºA)-->(°õ¦æ§Ú¦Û¤v½s¼gªºµ{§Ç) -->½Æ ...
pointchi µoªí©ó 2021-12-22 22:53


  Dim wb As Workbook
     For Each wb In Workbooks
         If LCase(wb.Name) Like "Link*.xls*" Then
             Workbooks(wb).Worksheets("PickListLinkPDA").Columns("A:AU").Cells.Copy '½Æ»sLink(N-1).xlsx¤¤ªºPickListLinkPDAªí³æ½Æ»s
            Workbooks("test1.xlsm").Worksheets("raw").Select  '¶K¦Ü¥DÀÉtest1.xlsm¤¤ªºrawªí³æ
            Range("A1").Select
             ActiveSheet.Paste
         End If
(¥D­n¬O¤W­±³o¬qµ{§Ç¥X²{µ{§Ç¿ù»~ªº²§±`)
>> ­×§ï¦p¤U¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
For Each wb In Workbooks
    If LCase(wb.Name) Like "link.xls*" Then
        Workbooks(wb.Name).Sheets("PickListLinkPDA").Columns("A:AU").Copy '½Æ»sLink(N-1).xlsx¤¤ªºPickListLinkPDAªí³æ½Æ»s
        Windows("TEST1.xlsm").Activate '¶K¦Ü¥DÀÉtest1.xlsm¤¤ªºrawªí³æ
        Range("A1").Select
        ActiveSheet.Paste
    End If
Next

TOP

¦^´_ 4# samwang
·PÁÂS¤j¡A¤w¸g¥i¥H¦¨¥\°õ¦æµ{§Ç¡C
·PÁÂ~

TOP

        ÀR«ä¦Û¦b : ¦a¤WºØ¤Fµæ¡A´N¤£©öªø¯ó¡F¤ß¤¤¦³µ½¡A´N¤£©ö¥Í´c¡C
ªð¦^¦Cªí ¤W¤@¥DÃD