or so on, you also might need to add the excel sheet file path or location. You can get the excel sheet path location manually by going to the folder where the file is present and then, going to its properties window and getting the path location. ...
Sub filePath() Dim filename As String Dim x As Variant For Each cell In ActiveSheet.Range("B5:B11") x = Split(cell.Value, Application.PathSeparator) filename = x(UBound(x)) cell.Value = filename Next cell End Sub Get only the filename from the path in your Excel worksheet. Things...
Sub GetImportFileName2() Dim FileNames As Variant Dim Msg As String Dim I As Integer FileNames = Application.GetOpenFilename(MultiSelect:=True) If IsArray(FileNames) Then Msg = "You selected:" & vbNewLine For I = LBound(FileNames) To UBound(FileNames) Msg = Msg & FileNames(i)...