*.exe ±ý¨ú±o¥»¨¤§ÀɦWÀ³¦p¦ó¤U»yªk
- ©«¤l
- 258
- ¥DÃD
- 77
- ºëµØ
- 0
- ¿n¤À
- 385
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2010-8-8
- ³Ì«áµn¿ý
- 2021-1-25
|
*.exe ±ý¨ú±o¥»¨¤§ÀɦWÀ³¦p¦ó¤U»yªk
½Ð±Ð½Ñ¦ì¥ý¶i:
Sub Main()
Dim objXLApp
Dim objXLBook
Dim fso3
Set fso3 = CreateObject("Scripting.FileSystemObject")
GetAn3 = fso3.GetbaseName(myself)
MsgBox GetAn3
End Sub
¥H¤WÂର*.exe ±ý¨ú±o¥»¨¤§ÀɦW myselfÀ³¦p¦ó¤U»yªk |
|
|
|
|
|
|
- ©«¤l
- 258
- ¥DÃD
- 77
- ºëµØ
- 0
- ¿n¤À
- 385
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2010-8-8
- ³Ì«áµn¿ý
- 2021-1-25
|
¦^´_ 6# Min
Replace(Wscript.ScriptFullName, Right(Wscript.ScriptFullName, 4), ".xls")
¥i§_¥ý¨ú±o am=Wscript.ScriptFullName
Replace(am, Right(am, 4), ".xls")
§Ú¹Á¸Õ¬Ý¬Ý ÁÂÁ |
|
|
|
|
|
|
- ©«¤l
- 172
- ¥DÃD
- 39
- ºëµØ
- 20
- ¿n¤À
- 177
- ÂI¦W
- 0
- §@·~¨t²Î
- Microsoft Windows XP
- ³nÅ骩¥»
- Microsoft Office 2003
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- °ª¶¯
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2023-3-19
|
1.
½Ð°Ý±zªº¥Øªº¬O¤°»ò? n¥Îexcel ¤S¤£Åý¤H®a¶}excel.... ¦nÁ}²`ªº°ÝÃD>"<
¦pªG±zªº¥Øªº¥u¬OnÅýusers¨S¦³¶}±Ò¥¨¶° ´N¬Ý¤£¨ì¸ê®Æ ¨ºª½±µ¨ìexcel°Ï¯Ò¤å ´N¥i¥H§ä¨ì¬ÛÃöªº¤å³¹..
¤£¹LµL½×¬Oþ¤@ºØ¤è¦¡ ³£·|¦³º|¬}... Excel ¶i¶¥°ÏªºHUNGCHILINª©¥D ´Nµo¦n¦hÃþªº¤å³¹..
2.
±z«e±¤£¬O´N¦³¼g¨ì Set objXLApp = CreateObject("Excel.Application") ...
n¤Þ¥Îexcel¶i¨Ó ¤~¥i¥H¨Ï¥Îexcel¥\¯à~
ÁÙ¦³VBS¤£»Ýn¸òµÛ§ïÀɦW³á... µ½¥Î¤@¤U¨ç¼Æ^^
Replace(Wscript.ScriptFullName, Right(Wscript.ScriptFullName, 4), ".xls") |
|
Y¬O§Ú¦^µª¡A¨Ï±zº¡·N¡A½Ð±zÅý§Úª¾¹D¡I
Y¬O§Úªº¦^ÂСA±z¤´¦³¨ä¥L¨£¸Ñ¡A¤]½Ð±z¤£¶Þ«ü±Ð¡I
|
|
|
|
|
- ©«¤l
- 258
- ¥DÃD
- 77
- ºëµØ
- 0
- ¿n¤À
- 385
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2010-8-8
- ³Ì«áµn¿ý
- 2021-1-25
|
¥»©«³Ì«á¥Ñ yangjie ©ó 2010-11-6 11:45 ½s¿è
¦^´_ 4# Min
¤£¦n·N«äÅýMin¥S¨£¯º¤F¡B¡B¡B
¨ä¥Dn¬Ù¤U敎¹ïPC¤£«Ü¼ô¦³ÃöMacroªº¨Æ¡A
¥H«e¤]¬O¥ÎVBS³B²z¡C
¤@¥¹§ïÀɦW¡A«hVBS¤º®e¤]n§ï¡A¤~·Q¥Î*.exe
¶¶¹D½Ð±Ð1:
¦p¦ó§@ªk? Åý¥L¤H«D±o¥Î*.exe¤~¶}±o¤F§Úªº*.xls
§_«h·|application.quit
¶¶¹D½Ð±Ð2:
¥H«e¥Î¹L*.xls ¥h³]©w Excelµ{¦¡ ·Q¦b*.exe¤º°õ¦æ¥H¤U"³]©wExcel"
VBÀ³¦p¦ó¼gªk
Private Sub Workbook_Open()
yangan = GetSetting(appname:="yangApp", section:="Startup1", key:="¨Ï¥Î½T»{", Default:=88)
SaveSetting "yangApp", "Startup1", "¨Ï¥Î½T»{", yangan
Application.Quit
End Sub |
|
|
|
|
|
|
- ©«¤l
- 172
- ¥DÃD
- 39
- ºëµØ
- 20
- ¿n¤À
- 177
- ÂI¦W
- 0
- §@·~¨t²Î
- Microsoft Windows XP
- ³nÅ骩¥»
- Microsoft Office 2003
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- °ª¶¯
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2023-3-19
|
¨þ¨þ¨þ~
ì¨Óyangjie¥S¬O·Q¶¹LEXCEL VBA¦w¥þ©Ê ¶}±ÒEXCEL...
³oÓ§Ú¤]°µ¹L ¤£¹L§Ú¬O¥ÎVBS
¨ä¤è¦¡³£¬O»P±zªº¤j¦P¤p²§~ |
|
Y¬O§Ú¦^µª¡A¨Ï±zº¡·N¡A½Ð±zÅý§Úª¾¹D¡I
Y¬O§Úªº¦^ÂСA±z¤´¦³¨ä¥L¨£¸Ñ¡A¤]½Ð±z¤£¶Þ«ü±Ð¡I
|
|
|
|
|
- ©«¤l
- 258
- ¥DÃD
- 77
- ºëµØ
- 0
- ¿n¤À
- 385
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Taiwan
- µù¥U®É¶¡
- 2010-8-8
- ³Ì«áµn¿ý
- 2021-1-25
|
¥»©«³Ì«á¥Ñ yangjie ©ó 2010-11-5 23:53 ½s¿è
·PÁÂ Min ¤j¤j
¤w¦bVB°ÏÅý±zµ¹¸Ñ¨M¤F f1 = App.EXEName f1 ´N¬OBaseName
¥H¤U¥þ¤å¨Ñ¤j®a°Ñ¦Ò Âন°õ¦æÀÉ*.exe«á¥i¥H¶}¦PÀɦWªº*.xls
¤£¥Î¦A¥h²z·|¦w¥þ©Ê¼h¯Å°ÝÃD
Sub Main()
Dim f1
f1 = App.EXEName
Dim fso, f As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile(f1 & ".xls")
Dim n
n = fso.GetParentFolderName(f.Path)
Set objXLApp = CreateObject("Excel.Application")
objXLApp.Visible = True
Set objXLBook = objXLApp.Workbooks.Open(n & "\" & f1 & ".xls")
Set objXLBook = Nothing
Set objXLApp = Nothing
Set fso = Nothing
Set n = Nothing
Set f = Nothing
End Sub |
|
|
|
|
|
|
- ©«¤l
- 172
- ¥DÃD
- 39
- ºëµØ
- 20
- ¿n¤À
- 177
- ÂI¦W
- 0
- §@·~¨t²Î
- Microsoft Windows XP
- ³nÅ骩¥»
- Microsoft Office 2003
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- °ª¶¯
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2023-3-19
|
GetbaseName¸Ì±¬O©ñ¸ô®|...
¤p§Ì·M¬N ¤£¤F¸Ñ±z´£°Ýªº"¥H¤WÂର*.exe"... |
|
Y¬O§Ú¦^µª¡A¨Ï±zº¡·N¡A½Ð±zÅý§Úª¾¹D¡I
Y¬O§Úªº¦^ÂСA±z¤´¦³¨ä¥L¨£¸Ñ¡A¤]½Ð±z¤£¶Þ«ü±Ð¡I
|
|
|
|
|