====================================================
' ダメなパターン
Dim strUnzipPath As String
' 出力パスを拾って
strUnzipPath = Worksheets("Sheet2").Range("A1").Text
Set zipObj = shellObj.Namespace(ActiveCell.Text).Items
Application.SendKeys strPass & "{Enter}"
' 解凍する
ret = shellObj.Namespace(strUnzipPath).CopyHere(zipObj)
====================================================
' おっけーなパターン
Set zipObj = shellObj.Namespace(ActiveCell.Text).Items
Application.SendKeys strPass & "{Enter}"
' 解凍する
ret = shellObj.Namespace("C:\Unzip").CopyHere(zipObj)
====================================================
' ダメなパターンの変数をVariant方にするとおっけーになる
Dim strUnzipPath As Variant
' 出力パスを拾って
strUnzipPath = Worksheets("Sheet2").Range("A1").Text
Set zipObj = shellObj.Namespace(ActiveCell.Text).Items
Application.SendKeys strPass & "{Enter}"
' 解凍する
ret = shellObj.Namespace(strUnzipPath).CopyHere(zipObj)
--
あめ のち はれ
No comments:
Post a Comment