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

[µo°Ý] ¨â­Ó¿W¥ßEXCEL ¦p¦ó±N¹Bºâ§¹ªº¸ê®Æ¦^¶Ç¨ì¥DExcel?

¦^´_ 8# Scott090
    ·PÁ«e½úªº¦^À³
Ãþ¦ü¨º¼Ë©I¥s¦ý¤S¤£¤j¤@¼Ë.....®t¦b¸ó¼h©I¥s
²Ä¤@±ø°Ñ¦Ò§Ú¸Õ¹L.¥i¦æ
²Ä¤G±ø§Ú·|¦b¸Õ¬Ý¬Ý

¥Ø«e´ÂApplicationª«¥ó¨º¤è­±¹Á¸Õ..¤]´N¬O.GBKEE¤j¤jµ¹ªº°Ñ¦Ò¤U¥h¬ã¨s

TOP

¦^´_ 3# 502243


   ©Ò¥H§ÚªºÀɮצ³¦^µª¨ì§Aªº°ÝÃD?

TOP

¦^´_ 12# zheng211016
®t¦b¦h¤@­Óexcel.exeªºª«¥ó±±¨î..´N³Â·Ð¤FÂI...ºô¸ô¤W±´°Qªº¦n¹³¨Ã¤£¦h
¤]©ÎªÌ¬O§Úªº¬d¸ß®ÉÃöÁä¦r¨S¬d¨ì..
¤£¹LÁÙ¬O·PÁ¦U¦ì«e½úªº«üÂI¨ó§U

TOP

°²­Y®³Sub Ex_newexce1()¥X¨Ó­×§ï¤@¤U..
¥u¬O³æ¯Âªº½Æ»s¶K¤W

Sub Ex_newexce2()
     Dim AR As Variant, Rng(1 To 2) As Range, E As Range

      With Workbooks("a").Sheets(1)
          Set Rng(1) = .Range(¡§A1¡¨, .Range(¡§A1¡¨).End(xlDown))   ¡¥¦Pexcel.exe ¥i¥H¦¨¥\
          Set Rng(2) = Workbooks(¡§a¡¨).Sheets(1).Range(¡§c1¡¨)       ¡¥AÀÉAÄæcopy AÀÉCÄæ      
           Rng(1).Copy Rng(2)
      End With
   
End Sub


Sub Ex_newexce3()
     Dim AR As Variant, Rng(1 To 2) As Range, E As Range

      With Workbooks("a").Sheets(1)
          Set Rng(1) = .Range(¡§A1¡¨, .Range(¡§A1¡¨).End(xlDown)) ¡¥¤£¦Pexcel.exe  ·|¥¢±Ñ
          Set Rng(2) = Ap.Workbooks(¡§c¡¨).Sheets(1).Range(¡§c1¡¨) ¡¥¡¥AÀÉAÄæcopy CÀÉCÄæ
           Rng(1).Copy Rng(2)
      End With
   
End Sub

¤p§ÌÁÙ¦b«ä¯ÁµÛ¿ù»~ªº­ì¦]....

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2019-3-14 10:20 ½s¿è

¦^´_ 10# 502243
§A¥u¥Î¹Ï¤ù»¡©ú,¦ý¦p¦A¯à¥[¤W½d¨ÒÀɲ»¥[»¡©ú¤@¤Áª¬ªp,
¦^ÂЪ̷|¶K¤Áªº¦^µª  


§AºÃ´b<===E.Range("d1")  ¬°¦ó¬O¥ÎE?¦Ó¤£¬O¥ÎAp.Workbooks("c").Sheets(1)
Aªº¸ê®Æ ¤£¬O­n¶K¤WC ªºAÄæ ¶Ü?
Set Rng = Ap.Workbooks(1).Sheets(1).Range("A1") '«ü¦WCÀɤU
¿z¿ï[AÄæ]>5 ¨úªº C ªºDÄæ ªº¸ê®Æ  >>¤£´N  E.Range("d1")

§AºÃ´b  If AR <> "" Then '¦³¸ê®Æ    <====AR³Ì¤W­±¤£¬O¤w¸g²MªÅ¬°0¤F??
³o¸Ì°Ú******
For Each E In Rng
        '¤j©ó5 ¼g¤WDÄ檺­È  **¦³
        If E > 5 Then AR = AR & "," & E.Range("d1")
    Next
***********
xApp.App.Quit   ©Î   Ap.Quit      ³£¥i


¦^´_ 14# 502243
¤£¦Pexcel.exe  ¶¡ ªºª«¥ó µLªk¥ÎCopy
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 15# GBKEE

·PÁÂGBKEEª©¥D¤j¤jªºÀ°§U..
    ¥Ø«e«ö·Óª©¤jªº¼Ë¥»¤j²¤­×§ï¤F¤@¤U..¦p¤UªþÀÉ Excel VBA.zip (51.75 KB)
    ¥t¥~·|´Â ¤£¦Pexcel.exe  ¶¡ ªºª«¥ó ±±¨îÃöÁä¦r¦b¤U¥h·j´M¬ÛÃö»y¥y
      Ap.Quit    <==³o«ü¥O¥Î¦bexcel.exeª«¥ó¸Ì­± ¥i¥HÅýªí­±µ{¦¡¬Ý°_¨Ó¤£¨£  «o·|´Ý¦sexcel.exe
    ¾É­P¦pªG±j¨î±q  ¤u§@ºÞ²z­ûÃö³¬ªº¸Ü  ¦A¦¸±Ò°Ê  Sub Ex_¶}©l( )·|²£¥Í"462"¿ù»~   <==¿ù»~µo¥Íªº­ì¦]«Ü¦h
   
001.png
   ¤£¹Lµ¹ªº¤è¦VÁÙ¬OÀ°§U«Ü¤j....«Ü·PÁÂ.....(²¦³º¤p§Ì¬ã¨s¤F¤@­Ó§«ô³£§ä¤£¨ì¤è¦V..¤ß²zºw©BµÛ)

TOP

¥»©«³Ì«á¥Ñ quickfixer ©ó 2019-3-15 04:18 ½s¿è

¦^´_ 16# 502243

§A­nªº¤£¬O¦P¤@­Óexcel¶}2­ÓÀɤ¬¶Ç,¦Ó¬O2­Ó¤£¦Pexcel.exe¤¬¶Ç¸ê®Æ,¹ï¶Ü?

°Ñ¦Ò¸ê®Æ¨Ó·½
https://www.mobile01.com/topicdetail.php?f=511&t=4737630&p=1
(#244f)
§Ú¸Õ¹L¤u§@ºÞ²z­û¤£·|´Ý¦sexcel.exe
1.xlsm
  1. Sub test()

  2.     Dim app1 As Object, book1 As Excel.Workbook
  3.     Set app1 = CreateObject("Excel.Application")
  4.     Set book1 = app1.Workbooks.Open(ThisWorkbook.Path & "\" & "2.xlsm")
  5.     app1.Visible = True
  6.    
  7.     Dim sourcedata As Range, targetdata As Range, temp() As Variant
  8.     Set sourcedata = Sheets("a").Range("a1:a5")
  9.     Set targetdata = book1.Sheets("b").Range("a1:a5")
  10.     temp = sourcedata
  11.     targetdata.Value = temp
  12.    
  13.     app1.Run "test"
  14.    
  15.     Set sourcedata = book1.Sheets("b").Range("b1:b5")
  16.     Set targetdata = Sheets("a").Range("c1:c5")
  17.     temp = sourcedata
  18.     targetdata.Value = temp
  19.    
  20.     book1.Close SaveChanges:=False
  21.     app1.Quit
  22.     Set app1 = Nothing
  23.     Set book1 = Nothing
  24.    

  25. End Sub
½Æ»s¥N½X
2.xlsm
  1. Sub test()
  2.    
  3.     For i = 1 To 5
  4.         Sheets("b").Cells(i, 2) = Sheets("b").Cells(i, 1) + Rnd()
  5.     Next i
  6.    
  7. End Sub
½Æ»s¥N½X
excel.zip (24.51 KB)

TOP

¦^´_ 16# 502243
    '¤@¯ë Module ªºµ{¦¡½X
  1.     Option Explicit
  2.     Public Ap As Object, Aa As Object
  3.    Sub Ex_¶}©l()
  4.          '·s¶}2­ÓExcel µ{¦¡
  5.          Set Ap = New Application
  6.         Set Aa = New Application
  7.          Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  8.         Ap.Visible = True
  9.        Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  10.         Aa.Visible = True
  11.         Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  12.          
  13.     End Sub
  14.      Sub Ex_µ²§ô()
  15.           Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  16.           Ap.Quit
  17.           Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  18.           Aa.Quit
  19.           Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  20.     End Sub
  21.    
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 17# quickfixer


    ·PÁÂquickfixer¤j¤jªº¸ê®Æ°Ñ¦Ò
   ªº½T¬O¨â­Ó¤£¦Pªºexcel.exe¸ê®Æ¤¬¶Ç....
    ­ì¨Ó¬O­n§Q¥Îset ¥[¤W½w½Ä°Ï...
   ©¡®É§Ú·|°Ñ¦Ò«e½ú­Ìªº¼Ò«¬°òªO¤U¥h°µ­×§ï½Õ¾ã.....
   ¸U¤À·PÁÂ~

TOP

¥»©«³Ì«á¥Ñ 502243 ©ó 2019-3-15 08:43 ½s¿è

¦^´_ 18# GBKEE
  1.   '¤@¯ë Module ªºµ{¦¡½X
  2. Option Explicit
  3.     Public Ap As Object, Aa As Object
  4.    Sub Ex_¶}©l( )
  5.          '·s¶}2­ÓExcel µ{¦¡
  6.          Set Ap = New Application
  7.           Set Aa = New Application
  8.             Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  9.              Ap.Visible = True
  10.             Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  11.              Aa.Visible = True
  12.       '  Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý         
  13.     End Sub

  14.      Sub Ex_µ²§ô( )
  15.           Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  16.           Ap.Quit
  17.           Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  18.           Aa.Qui
  19.           Stop '¶}±Ò¤u§@ºÞ²z­û¬Ý¬Ý
  20.     End Sub

  21.     Sub test( )
  22.         Dim app1 As Object, book1 As Excel.Workbook
  23.         Set app1 = CreateObject("Excel.Application")
  24.         app1.Visible = True                 
  25.         app1.Quit
  26.         Set app1 = Nothing
  27.     End Sub
½Æ»s¥N½X
­è¸Õ¤F¤@¤U test¥i¥H§¹¥þÃö³¬·s«Ø¥ßexcel.exe  »P¤W­±ªº®t²§ ¦h¤F¤@­Óset app1=Nothing
©Ò¥H·s«Øexcelª«¥ó   «Ø¥ß»PÃö³¬¤£¯à©î¤À¦¨¨â­Ó°Æµ{¦¡?
®¦...§Ú¦b¦h¸Õ´X­Ó¬Ý¬Ý

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD