PDA

View Full Version : VBA to import sheets from a workbook in a folder



kevvukeka
06-11-2013, 09:45 PM
Hi All,

I have developed a macro along with a userform and saved it in a sheet. The macro is based on two sheets "Fruits" and "Icecreams".

Now the data for these two sheets is imported from two different workbooks separately. One for Fruits and one for Ice Creams.

these two workbooks are saved in one folder. Each time I will open the folder. Open the "Fruits workbook". select the "Fruits" sheet and copy data from Columns "A:B" to my workbook->"sheets("Fruits")(My workbook contains the code which I developed). Same with "Icecream workbook".

Later I will refresh my userform which will capture this new data.

Can I get some help in setting some code for this data import from two different workbooks in to "My Workbook". I have attached a sample data.

xls
06-15-2013, 11:09 PM
Hi

you got to tweak code to work on from following referances:

http://www.ozgrid.com/forum/showthread.php?t=100110

http://www.mrexcel.com/forum/excel-questions/565756-visual-basic-applications-import-data-another-workbook.html

http://www.rondebruin.nl/win/s9/win002.htm

HTH

kevvukeka
06-17-2013, 12:23 AM
Thanks for the references.. I will check for modifications...