Home
Blog
Inquire

VBA

VBA--- フォルダ選択



 Private Sub CommandButton001_Click()
  Dim shell, vfd As Object
  Set shell = CreateObject("Shell.Application")
  Set vfl = shell.BrowseForFolder(&O0, "保存フォルダを選んでください", &H1 + &H10, "C:\")
  If Not vfd Is Nothing Then ThisWorkbook.Worksheets("手順").Range("D2") = vfd.Items.Item.Path
 End Sub
    
   


©2018KanazawaNoSakai