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

ENVIRON环¹Ò参数

ENVIRON环¹Ò参数

On Error Resume Next
Dim arr(), i As Integer
i = 1
Do
ReDim Preserve arr(1 To 2, 1 To i)
arr(1, i) = Split(environ(i), "=")(0)
arr(2, i) = Split(environ(i), "=")(1)
i = i + 1
Loop Until environ(i) = ""
Range("a1").Resize(UBound(arr, 2), 2) = Application.WorksheetFunction.Transpose(arr)
学习

¦^´_ 1# wqfzqgk
§A´£¨Ñªºµ{¦¡½X¤¤
·í i=22 ®É   Split(environ(i), "=")(1) ªº¦r¤¸¼Æ¬°294 >255 ¦b°}¦C¤¤µLªkÂà¸m
¾É­P    Range("a1").Resize(UBound(arr, 2), 2) = Application.WorksheetFunction.Transpose(arr)
²£¥Í¿ù»~­È §A¥Î On Error Resume Next ¤]µLªk®ø°£
¦p¥Î Range("a1").Resize( 2, UBound(arr, 2)) = arr  ¤£¨Ï¥ÎÂà¸m ¨S¦³¿ù»~¥X²{
  1. Sub Ex()
  2.     Dim i As Integer
  3.     i = 1
  4.     Do
  5.         Cells(i, 1) = Split(Environ(i), "=")(0)
  6.         Cells(i, 2) = Split(Environ(i), "=")(1)
  7.         i = i + 1
  8.     Loop Until Environ(i) = ""
  9. End Sub
½Æ»s¥N½X

TOP

¬Ý来¬O这个¨ç数ªº¨Æ
学习

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD