You just need a function to define your static strFolder:
Code:
Sub TestMethods()
MsgBox fcnFolderPicker_msoFileDialogMethod("Select folder")
MsgBox fcnShellBrowseForFolder
End Sub
Function fcnFolderPicker_msoFileDialogMethod(strTitle As String, Optional strInitialPath As String = "C:\", Optional bAllowMulti As Boolean = False) As String
Dim strPath As String
Dim fDialog As FileDialog
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog 'Pick folder containing the files
.Title = strTitle
.AllowMultiSelect = bAllowMulti
.InitialView = msoFileDialogViewList
.InitialFileName = strInitialPath
If .Show <> -1 Then
fcnFolderPicker_msoFileDialogMethod = "Nothing selected, cancelled by user"
Exit Function
End If
strPath = fDialog.SelectedItems.Item(1)
fcnFolderPicker_msoFileDialogMethod = strPath
End With
lbl_Exit:
Exit Function
End Function
Function fcnShellBrowseForFolder(Optional strTitle As String, Optional strRootFolder As Variant) As String
On Error Resume Next
fcnShellBrowseForFolder = CreateObject("Shell.Application").BrowseForFolder(0, strTitle, 0, strRootFolder).Items.Item.Path
On Error GoTo 0
lbl_Exit:
Exit Function
End Function