Where's my data??

mn1del

New Member
Joined
Oct 17, 2005
Messages
8
Hi all, can anybody help?

I'm running a macro which attempts to open up a csv file, and goes on to copy and paste certain info into my spreadsheet. However, I'm falling at the first hurdle: the following code (which is the first line of the macro) does seem to open up the file "xyz.csv", but it is completely blank!

Workbooks.Open Filename:="xyz.csv"

Where is all my information??

Many thanks in advance
 

Some videos you may like

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

XLGibbs

Well-known Member
Joined
Feb 25, 2005
Messages
2,446
Uh, there is no data in the CSV text file?

Excel didn;t delete it unless your copy /paste macro was pasting blank data from the excel file into the text file (as in, your copy/paste was reveresed)...hope not...
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,523
Office Version
  1. 365
Platform
  1. Windows
Also make sure that you are telling VBA to look in the correct directory.
 

Watch MrExcel Video

Forum statistics

Threads
1,119,264
Messages
5,577,060
Members
412,763
Latest member
sienweiw
Top