malleshg24
09-22-2019, 01:10 PM
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
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