1 Attachment(s)
VBA Browse multiple workbooks how to short the code....
Code:
Hi Team,
I need your help plz assist, I am using below code to browse Multiple required Inputworkbooks,
is there a way to shorten this code, by creating single function.
Thanks in Advance !
Sub GetWorkbook1()
Set myfile = Application.FileDialog(msoFileDialogOpen)
With myfile
.Title = "Choose File"
.AllowMultiSelect = False
If .Show <> -1 Then
Exit Sub
End If
FileSelected = .SelectedItems(1)
End With
ActiveSheet.Range("b4") = FileSelected
End Sub
Regards,
mg