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

[µo°Ý] VB¦³µL¿ìªk¨ÏÀÉ®×Á`ºÞ¸ê®Æ§¨µøµ¡¦Û°ÊÁY¦Ü³Ì¤p¤Æ

[µo°Ý] VB¦³µL¿ìªk¨ÏÀÉ®×Á`ºÞ¸ê®Æ§¨µøµ¡¦Û°ÊÁY¦Ü³Ì¤p¤Æ

½Ð±Ð½Ñ¦ì¤j¤j
¦p¤U¦C ¦bVB6.0¤U »s¦¨  exe°õ¦æÀÉ
Option Explicit
Sub Main()
    Dim f1
    f1 = App.EXEName
    Dim fso, f As Object
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetFile(f1 & ".exe")
    Dim n
    n = fso.GetParentFolderName(f.Path)
    Dim objXLApp
    Set objXLApp = CreateObject("Excel.Application")
    objXLApp.Visible = True
    Dim objXLBook
    Set objXLBook = objXLApp.Workbooks.Open(n & "\" & f1 & "¸ê®Æ®w\" & f1 & ".xls")
    Set objXLBook = Nothing
    Set objXLApp = Nothing
    Set fso = Nothing
    Set n = Nothing
    Set f = Nothing
End Sub
­Y·Q°õ¦æ¸Ó°õ¦æÀÉ®É
ÀÉ®×Á`ºÞ¸ê®Æ§¨µøµ¡Á`¬O¾×¦í©Ò¶}¥Xªºªí³æ
VB¦³µL¿ìªk ©Î»yªk¥[¤J¤W­z¤º
¨ÏÀÉ®×Á`ºÞ¸ê®Æ§¨µøµ¡©Î¨ä¥Lµøµ¡¦Û°ÊÁY¦Ü³Ì¤p¤Æ
½Ð¤j®a½ç±Ð   ÁÂÁ«ü¾É  (¦³ÂI«æ)

¦^´_ 1# yangjie
À³¸Ó»¡
¥ÎVB¶}¤@­ÓExcelÀÉ
µ{¦¡½X¤@¶}ÀY­n¨Ï®à­±¤W¨ä¥L©Ò¦³µøµ¡ÁY¤p¦Ü¿Ã¹õ³Ì¤U¤@¦C(¦³¦p¨Ï¦¹ExcelÀÉ
¦b³Ì¤W¤@¼h¥ç¥i)

TOP

¦^´_ 1# yangjie
§ä¨ì¤F,¥u­n¥[¤W
CreateObject("Shell.Application").MinimizeAll
§Y¥i
¨Ñ¤j®a°Ñ¦Ò

TOP

        ÀR«ä¦Û¦b : ÁÀ¨¥¹³¤@¦·²±¶}ªºÂAªá¡A¥~ªí¬üÄR¡A¥Í©Rµu¼È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD