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

Environ() µLªk¨ú±o§Y®ÉªºÀô¹ÒÅܼÆ?

Environ() µLªk¨ú±o§Y®ÉªºÀô¹ÒÅܼÆ?

³q±`§Ú³£¥ÎEnviron¨ç¼Æ¨ú±o¨t²ÎÀô¹ÒÅܼƪº­È¡]¹³¬O¨ú±o¨ä¥LÀ³¥Î³nÅ骺¦w¸Ë¸ô®|µ¥¡^
Àô¹ÒÅܼƥi¥Ñ¡G±±¨î¥x¡Ö¨t²Î¤Î¦w¥þ©Ê¡Ö¨t²Î¡Ö¶i¶¥¨t²Î³]©w¡Ö¶i¶¥>Àô¹ÒÅܼƸ̭±¬Ý¨ì

¦ý¬O³Ìªñµo²{¦pªGExcel¦b¶}±Ò®É¡A±q±±¨î¥x¥h­×§ï¤FÀô¹ÒÅܼƫá¡A¦A¥ÎEnviron¨ú±oªº¸ÓÅܼƭȤ£·|¸òµÛ§ïÅÜ....
°£«DExcel­«¶}¦A¸Õ¤~·|§ó·s¸ÓÀô¹ÒÅܼÆ(¦ý§Ú¤£§Æ±æ¨Ï¥ÎªÌ¨C¦¸°õ¦æ¥¨¶°«e³£­n¥ýÃö³¬Excel...)
¬O§_¦³¨ú±o·í¤UÀô¹ÒÅܼƪº¤èªk¡H

¹ê»Ú¨Ò¤l¦p¤U¡G
1. ¨t²ÎÀô¹ÒÅܼƦ³¤@ÅÜ¼Æ CDSROOT , ÅܼƭȬ° C:\Cadence\SPB_16.5¡]¬YÀ³¥Î³nÅ骺¦w¸Ë¸ô®|¡^
2. °õ¦æ§ÚªºVBA¼W¯q¶° , Environ("CDSROOT") ¥i¥H¨ú±o C:\Cadence\SPB_16.5
3. ¨Ï¥ÎªÌ¥i¯à¤Á´«À³¥Î³nÅ骩¥» , ±N CDSROOT ªºÅܼƭȧאּ C:\Cadence\SPB_16.6
4. °õ¦æ§ÚªºVBA¼W¯q¶° , Environ("CDSROOT") «oÁÙ¬O¨ú±o C:\Cadence\SPB_16.5 (¦Ó¤£¬O16.6)
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

¦^´_ 1# stillfish00
ªá¤F³\¦h®É¶¡
§ä¨ì´À¥N¤è¦¡:
  1. Dim wshShell As Object
  2. Set wshShell = CreateObject("WScript.Shell")
  3. MsgBox wshShell.Environment.Item("­n§äªºÀô¹ÒÅܼƦWºÙ")
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

        ÀR«ä¦Û¦b : ¨C¤ÑµL©Ò¨Æ¨Æ¡A¬O¤H¥Íªº®ø¶OªÌ¡A¿n·¥¡B¦³¥Î¤~¬O¤H¥Íªº³Ð³yªÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD