Need Help!!!!

AcTiVation

New Member
Joined
Mar 4, 2002
Messages
8
I'm in need of VBA code that will collect data from a range in different excel files that are located in different directories with different file names, and each with their own password. Then paste the data ranges from all the files in a central file which will then be used for statistical purposes.

Thanks in advanced.

L.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi.
You could try method where location of files are on excel sheet, on column A. Column B has file name, and column C passwd.

Important! file location in sheet must be in format \networkdrive_path, not in networkdrive letter.

sub open_all
a=1
while cells(a,1).value <>""
file_location=cells(a,1).value
file_name= cells(a,2).value
file_passwd=cells(a,2).value
workbooks.open file_location & file_name password=file_passwd
call copy_data
wend
end sub

function copy_data
I think you can personaly code this, this would be easy, activate workbook, then worksheet, select range, copy, close activewindow, paste to central function, into first blank row
end function

HTH
donalde
 
Upvote 0

Forum statistics

Threads
1,214,804
Messages
6,121,652
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top