hello,
i'm working on a small vba script with a button. this button copy's a folder path to a cell this work fine
but what i would like to have is that when the button is click and the folder path is selected
the button is replaced by the folder path... is this possible if so how.
this is the vba i'm using:
Sub CommandButton1_Click()
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = IIf(Range("E3").Value = "", ActiveWorkbook.Path, Range("E3").Value)
.Title = "Please choose a folder"
.AllowMultiSelect = False
If .Show = -1 Then Range("E3").Value = .SelectedItems(1)
End With
End Sub
Thanks!
Bookmarks