- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2019-3-13 14:15 ½s¿è
¦^´_ 7# 502243
¸Õ¸Õ¬Ý- '****A.xlsm ¸Ì±
- '**ª«¥óÃþ§O¼Ò²Õ Class1 ªºµ{¦¡½X
- Option Explicit
- Public WithEvents App As Application
- Property Set T_APP(p As Application)
- Set App = p 'ª«¥óÃþ§O ¾É¤Jª«¥ó
- App.Visible = True
- End Property
½Æ»s¥N½X- 'A.xlsm
- '¤@¯ë Module1 ªºµ{¦¡½X
- Option Explicit
- Public xApp As New Class1
- Public Ap As Object
- Private Sub Ex_¶}©l()
- Set Ap = New Application
- Set xApp.T_APP = Ap
- Ap.Workbooks.Open (ThisWorkbook.Path & "\C.XLSM")
- '** ½Ð×¥¿¬°¥¿½TÀɮצWºÙ***
- End Sub
- Sub Ex_newexcel()
- Dim AR As Variant, Rng As Range, E As Range
- With ThisWorkbook.Sheets(1) '«ü¦WAÀɤU
- Set Rng = .Range("A1", .Range("A1").End(xlDown))
- End With
- AR = Rng.Value 'AÀɤUªº¼ÆÈ
- Set Rng = Ap.Workbooks(1).Sheets(1).Range("A1") '«ü¦WCÀɤU
- Rng.EntireColumn = ""
- Set Rng = Rng.Resize(UBound(AR))
- Rng.Value = AR 'AÀɤUªº¼ÆȶK¦bBÀɤW
- AR = "" 'AR ²MªÅ
- For Each E In Rng
- '¤j©ó5 ¼g¤WDÄ檺È
- If E > 5 Then AR = AR & "," & E.Range("d1")
- Next
- Set Rng = ThisWorkbook.Sheets(1).Range("C:C") '
- Rng = ""
- If AR <> "" Then
- AR = Split(Mid(AR, 2), ",")
- Rng(1).Resize(UBound(AR)) = Application.WorksheetFunction.Transpose(AR)
- 'BÀÉ-->'¤j©ó5 ¼g¤WDÄæªºÈ **¼g¦bAÀÉCÄæ
- End If
- End Sub
- Private Sub Ex_µ²§ô()
- Ap.Workbooks(1).Close False
- xApp.App.Visible = False
- End Sub
½Æ»s¥N½X |
|