2 separate questions: Open Multiple Files using Application.GetOpenFilename/ graph overlays

Huby00

New Member
Joined
Nov 14, 2011
Messages
36
Hello,

I have two pretty general random questions regarding excel vba possibilities. First question 1 is immediately below; question two is after. The reason I am asking the questions is at the very end of this post.

Question 1 regarding Application.GetOpenFilename
Is it possible to open up multiple files at once?

Code:
    Dim strFile As String
    Dim myarray As Variant
     
    strFile = Application.GetOpenFilename
    If strFile <> "False" Then Workbooks.Open strFile
The module I have allows me to choose and access one file and run the macro on the file. The files I am trying to open are basically .txt files that can be in different folders; therefore a loop probably won't work. I want to be able to select multiple files like I can when I choose the open folder shortcut (i.e. clicking and dragging the mouse cursor so all the files will be highlighted).


SECOND QUESTION:
Is it possible to add multiple line graphs onto the same graph? I'm talking about up to and above 30 lines? Or should I not even try? Can someone give me tips if possible, I will do my own coding to be less troublesome to this group.


Reason for questions:
I have been challenged by my boss to create a macro that will compare the stacked graph of different files. Therefore I need to be able to open multiple files, and after running the macro to create graphs, put all the graphs onto one chart.

Thank you in advance for any tips suggestions comments jokes etc.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Just one quick plea then:

Is there an "getopenfilenameS" function or something of that nature to allow for me to open multiple files? and save it into an array?

or do i have to just loop it

if no one replies i will not shamelessly bump this post topic. can someone else bump for me? :) otherwise, i will venture into the abyss that is excel vba by my lonesome.
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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