EXCEL VBA EXPERTS HELP!!!!!!!!!!!!!! - Sajha Mobile
SAJHA MOBILE
EXCEL VBA EXPERTS HELP!!!!!!!!!!!!!!
Posts 6 · Viewed 4383 · Go to Last Post
Sukuchha
· Snapshot
Like · Likedby · 0

Hello ,

I am a novice in a VBA excel and i am facing a problem which is as follows:  I need to open 50 xls files and store its filename as erray function  so that i can use it for further calculation.

Thanks

 

Maverick_
· Snapshot
Like · Liked by · 0
What is ur problem? to open or to save??
nepalikanchha
· Snapshot
Like · Liked by · 0

LOL! Yes, please elaborate.

Raj_Raj
· Snapshot
Like · Liked by · 0
Create a table in access and import all the spreadsheets in the table...Do you calculation or whatever..Much easier......
techGuy
· Snapshot
Like · Liked by · 0
jfgi
akawi
· Snapshot
Like · Liked by · 0
Make a file such as "files.txt" with the names of all excel files in it. In your macro add:

    Open "files.txt" For Input As #1
    For i = 1 To 100 '(number of files =100)
        Input #1, fName ' fName is the name of file.
***********     
'Add your macro here: eg.,
workbooks.open(fName)
' Other scripts


workbooks(fName).close 'better to close the excel file before opening next
************

    Next i
    Close #1 'don't forget to close the text file

Please log in to reply to this post

You can also log in using your Facebook
View in Desktop
What people are reading
You might like these other discussions...
· Posts 1 · Viewed 113
· Posts 3 · Viewed 469
· Posts 96 · Viewed 22625 · Likes 22
· Posts 4 · Viewed 572 · Likes 2
· Posts 1 · Viewed 110
· Posts 15 · Viewed 2430
· Posts 24 · Viewed 2180
· Posts 6 · Viewed 407
· Posts 1 · Viewed 78
· Posts 1 · Viewed 83



Your Banner Here
Travel Partners
Travel House Nepal