Copy Data from another sheet

  • Thread starter Thread starter tnederlof
  • Start date Start date
T

tnederlof

Hey everyone, I have a big excel sheet with lots of formulas, macros,
ect but the one problem I have is that right now I have to load two
pages of data into the workbook each time I want to update everything.
I have to download the data and then I end up with two books...
Sheet_1.xls and Sheet_2.xls the first book has one sheet and needs
to be copied into the master book (sheet "raw data") and the second
book has one sheet which needs to be copied into the master book
(sheet "raw data2).

I would like to have a macro that would let the user in a dialog box
select where the files are located, have them open and copy their
sheets into the master. Is this possible? if so please help.

Thanks.
 
mySheet = Application.GetOpenFilename( _
filefilter:="Excel Files (*.xls),*.xls", Title:="Choose Files",
MultiSelect:=False)

'Make sure a file was selected
If mySheet = "False" Then
MsgBox "No file selected, please select a file", vbCritical
Exit Sub
End If

Workbooks.Open mySheet
 
Hit the button too soon. Just create a sub and put this in there, it will
open the selected file. Change or erase the file type section to suit what
file type you are getting.
 
Hit the button too soon. Just create a sub and put this in there, it will
open the selected file. Change or erase the file type section to suit what
file type you are getting.

thanks for your help, I get an error in the first part of the macro
everytime I run it, could you tell me where to put the code on
different lines please? Also once the sheet is opened how do I get it
to copy sheets off of this page.

Thanks again!
 
Back
Top