I would like to import an xlsm sheet with data into my workbook at the end of the last tab and have the new inserted sheet/tab name the xlsm filename being inserted less the path. below is my code but I cannot get it to work right. any thought to what i am missing or have wrong?
I switched to decaf tonight so i'm a little slow....any help is very much appreciated...thank you
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Filters.Add "Excel Files", "*.xlsx; *.xlsm; *.xls; *.xlsb", 1
.Show
fullpath = .SelectedItems.Item(1)
End With
If InStr(fullpath, ".xls") = 0 Then
Exit Sub
End If
Sheets.Add(, Sheets(Sheets.Count)).Name = fullpath
I switched to decaf tonight so i'm a little slow....any help is very much appreciated...thank you
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Filters.Add "Excel Files", "*.xlsx; *.xlsm; *.xls; *.xlsb", 1
.Show
fullpath = .SelectedItems.Item(1)
End With
If InStr(fullpath, ".xls") = 0 Then
Exit Sub
End If
Sheets.Add(, Sheets(Sheets.Count)).Name = fullpath