open and close workbooks

  1. G

    Open most recent file in folder, unmerge, copy, go to different file, paste. Need code, please help

    Would be very grateful to anyone who can provide assistance. I use a program that exports data to an xlsx file in a particular directory. The code below will open the most recent file in the hardcoded directory. Sub NewestFile() Dim MyPath As String Dim MyFile As String Dim...
  2. Z

    VBA to open file, copy data then close file

    Hi, I need to extract data from 130 files containing data is exactly in the same format. I have created a file into which the data must be extracted to. In this file: Sheet name: Sheet1 Cell C7 = path to find the data file to open and copy info from (C:\Users\me\Dropbox\Consolidation test)...
  3. V

    Trying to open and copy from two EXCEL workbooks simultaneously

    I am trying to open two workbooks using VBA, then copy selected contents from one to second. I wrote this code and can get the first workbook to open, then nothing happens. I am wondering if I should just open the first workbook, copy the selected contents to the desktop, close the first file...
  4. P

    Chart data changes automatically

    Hey all Mr Excel fans- Hope there's somebody out there who can help me. I have a spreadsheet with several worksheets and charts. If i close and save my spreadsheet and open it again one of my charts changes its data references so it becomes identical to another chart in my spreadsheet. I...
  5. S

    Copy Data, Open Another Workbook and paste data

    Hi, I am using some code to 1. Copy data from one sheet. 2. Open another file and select a specific tab 3. Pate the file However it looks like I am making an error around the directory naming convention when i go to open the file i want to copy to. Can someone please tell me where I am going...
  6. J

    Selecting Data/Copy/Open workbook/Paste data in cell/Save

    Hi Folks I have been pulling my hair out with this, i have found pieces of code around the place but this is just not working for me. to give you an idea, the code selects all of the data in x cells, copies the data, opens a workbook (master data sheet), finds the first blank cell in column A...
  7. J

    Open Files, Run Macro, Save, Close File

    I have been working on a code to open all files in a folder and run each of their macro, save&close each of them. I have a "Master" file that I am putting it in. I am getting a sub or fx not defined on my sub routine Call UpdateData part of the code. The full code is: Sub UpdateAll() Dim...
  8. C

    XLSTART issue (can't hide file)

    I've had a PERSONAL workbook (binary worksheet) on my work computer for about 3 years, used to store macro functions that I can reference in all files and has worked great. I prefer to have the PERSONAL file hidden when Excel opens, however for some reason Excel will no longer open if I try to...
  9. E

    Userform to open specific worksheet

    hi, im newbie in macro. trying to create a workbook which contains multiple sheet. I need userform with textbox for user to key in their user id which will open a specific worksheet tied to that user id. Other sheet must remain hidden.The userform must be auto open when the excel is opened and...
  10. R

    opening and closing files in a macro

    I am trying to create a macro that looks at a list of hyperlinks to other excel files in a master excel and pdf's the print area in each file. Another member of this site has helped me to get this far: Sub Macro1() 'below is the selection Range("B2:I16").Select 'the below command will save...
  11. T

    Macro to open new file refresh all pivot with external connection and clos the file

    I have 15 reports which need to be updated using Excel. Current manual procedure is open file --> Click on "Refresh All" (Doing so will refresh all pivot table with external connection -OLAP) --> Close the file. This needs to be done for each 15 files. Can someone please help me with code for...
  12. J

    Need a Excel macro to consolidate data from a specific tab from many excel files

    Hi Guys, I have never posted before but I am hoping that someone will know how to knock this out. My admin is going crazy opening all these files and then cutting and pasting little snippets into one merged file! I have to believe a macro type VBA program can help here. We need a...
  13. B

    Why does workbook 1 stay open after Workbook 2 opens?

    I have a macro that closes workbook one and opens workbook two. These are in user forms. It works fine except that workbook two automatically opens a user form and workbook one wont finish closing until a the user form is deactivated. I do not want this. Users will not have the ability to exit...

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