how to


Question by  reva (15)

How do you load data into excel sheet cells from a file using VBA?

I am trying to complete a work project and for the life of me I can not get this to work.


Answer by  chiefexec (27)

It depends upon the type of file that you are reading. If another Excel worksheet, you can have the code open the file then copy/paste. If a text file, it depends on whether the text file is delimited, how much you want to read at once. You would use the "open" command and "get", "input", or "line input".


Answer by  Kit (558)

In any event, if you are using Microsoft Office Excel 2007, right click the sheet tab - like "Sheet 1", then Click View Code, and try to load from there.


Answer by  Liz59 (10966)

Well all you have to do is open your excel and copy and paste the information from the VBA files onto the cells.

You have 50 words left!