Friday, 4 November 2016

Create a Folder Browse Dialog in Excel using VBA

In this post we are going to see how to create a Folder Browser Dialog in Excel using VBA, normally there is a common object which is used for savefile, select file, open folder separate based on parameters.

Dim folderPath As String

Sub Browse()
  Dim folderdlg As FileDialog
  Set folderdlg = Application.FileDialog(msoFileDialogFolderPicker)
  folderdlg.AllowMultiSelect = True
  If folderdlg.SelectedItems.Count > 0 Then
    folderPath = folderdlg.SelectedItems(1)
  End If
End Sub

When click on the Excel Files Folder , it will launch the folder browse dialog.

From the above code you can learn how to browse a folder using VBA in EXCEL

1 comment:

  1. This is an amazing blog,it gives very helpful messages to us.Besides that Wisen has established as Best Dot Net Training in Chennai. or learn thru ASP.NET Online Training . Nowadays Dot Net has tons of job opportunities on various vertical industry.