The current VBA i have is as follows;
I want to be able to code it so the macro asks the user which file to use but will use the same steps following this?Please Login or Register to view this content.
Any ideas
The current VBA i have is as follows;
I want to be able to code it so the macro asks the user which file to use but will use the same steps following this?Please Login or Register to view this content.
Any ideas
I have tried this but there is an error somewhere as it pastes all the data from a summary sheet to the next sheet in the workbook.
I need it to open a new file, copy all the data and paste it to "test sheet" then close the opened sheet.
Please Login or Register to view this content.
It will be good if you try explaining your problem with the help of an attached excel file. Can you clearly state what you require the macro to do?
Also, you can do away with the select & activate statements.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
I required coding to prompt the user for the file, copy all the data from the data sheet of the opened file and paste it into the data tab of the summary template.
Attached is the summary document.
Can you view the attachment
I just edited the code you had to thisAdd the pivot refresh code after this.Please Login or Register to view this content.
Thanks, i get the following error message with this line;
Error is Method 'Range' of object _global failedPlease Login or Register to view this content.
Try this line of code:
Please Login or Register to view this content.
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Still not happy.
Once the file has been opened it needs to copy the workbook and then switch back to the previous workbook and paste the copied data into the sheet.Please Login or Register to view this content.
I'm not sure this is doing those things.
Ok hold on. I have already provided you the code to do the copy paste. What is currently not working is the workbooks.open part. Can you give me the path from where you open the file ? Also, give me the name of the file.
The filepath of the data is;
\\Via.novonet\dfs\LIFE\F\INVReporting\CONFIDENTIAL\Inv_Reporting_2012\Source Files\S29
File name will be S29 Data then DDMMYY (this will be a different date each month, which is why i wanted to prompt the user to select which file
There is no drive letter before the path? Like C or D?
It's a network drive so doesn't need to be?
Try thisPlease Login or Register to view this content.
Last edited by arlu1201; 05-15-2012 at 10:04 AM. Reason: Edited code
I have updated and re run
Error message is object required.Please Login or Register to view this content.
Sorry, i have made the changes to the above code.
Spot on, works a treat, thank you for help, really apprecaite it!
Hi,
Did you ever try "Application.FindFile"??
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks