
Originally Posted by
SDruley
Rick,
That was a fast open but is there a way to open the contents of the csv file into Application.Range("BANKA"). I don't have CPU time to do a cut and paste. Wow you are up early.
Actually, I wasn't up early... I had not gone to sleep for the "night" yet. Based on a past message, I assume you mean BANKB, not BANKA (anyway, that is what the code below assumes). See if this code (run from the workbook with BANKB defined in it) works...
Code:
Sub Import_BANKA_DataFileInto_BANKB()
Dim FileNum As Long, TotalFile As String
FileNum = FreeFile
Open "c:\Temp\PicassoPg.csv" For Binary As #FileNum
TotalFile = Space(LOF(FileNum))
Get #FileNum, , TotalFile
Close #FileNum
Application.ScreenUpdating = False
With Range("BANKB").Columns(1)
.Value = WorksheetFunction.Transpose(Split(TotalFile, vbNewLine))
.TextToColumns Comma:=True
End With
Application.ScreenUpdating = True
End Sub
Bookmarks