Glasgowsmile
Active Member
- Joined
- Apr 14, 2018
- Messages
- 280
- Office Version
- 365
- Platform
- Windows
Good Morning,
I've got the code below -- I was hoping just adding CVS to the filter would allow me to import it but it doesn't so I need to help. How can I get this code to import CVS files?
I've got the code below -- I was hoping just adding CVS to the filter would allow me to import it but it doesn't so I need to help. How can I get this code to import CVS files?
Code:
Sub ActiveRateCategory()
Sheets("ActvRateCat SumRpt").Range("A:M").Clear
Dim wkbCrntWorkBook As Workbook
Dim wkbSourceBook As Workbook
Set wkbCrntWorkBook = ActiveWorkbook
With Application.FileDialog(msoFileDialogOpen)
.Filters.Clear
.Filters.Add "Excel 2007-13", "*.xlsx; *.xls; *.xlsm; *.xlsa; *.cvs"
.AllowMultiSelect = False
.Show
If .SelectedItems.Count > 0 Then
Workbooks.Open .SelectedItems(1)
Set wkbSourceBook = ActiveWorkbook
wkbSourceBook.Range("A1:L100").Copy
wkbCrntWorkBook.Sheets("ActvRateCat SumRpt").Range ("A1")
wkbSourceBook.Close False
End If
End With
End Sub
Last edited: