close a workbook

  1. B

    VBA: Close workbook after 15 min

    I somehow need to add to the section of code below a event to have the "(Public)Archive.xls" to automatically close 15 minutes without saving everytime it is opened.Kill "H:\All\Material Prep Archive\(Public)Archive.xls" Columns("A:H").Select Selection.Copy Workbooks.Add...
  2. S

    VBA Closing script getting stuck on wkb6

    Hi, I have got the below script working all the way through to wkb6.Close SaveChanges:=False it closes all up to this point, but I can't work out why it is stopping at this one. Please help</SPAN> Public Sub Update_Ref()</SPAN> Dim lngCalc As XlCalculation</SPAN> Dim wkb1 As...
  3. C

    VBA not closing *.xlsx file

    My code opens, creates and then closes a file when the information has been collected. The following line has always worked before. The only change is that the default file type is now *.xlsx. Workbooks(TempBookName).Close SaveChanges:=False Is the command different in 2010?
  4. C

    workbook.close ERROR please help as pulling my hair out!! One for true Guru's!!

    Hi gang, I have an error that i am at a loss how to fix / work around. I have the following code that facilitates a user to select a folder, then reads the .xls file and writes them to a column then loops through each one and inserts some values. All quite striaght forward(!) then it closes...
  5. C

    Trying to close a file but get "error 9"

    sfile is defined prior to reaching the close statement. The file is open. Assuming I figure out why, will it error out if the file is not open? Public Sub Print_Batch_RS() Application.ScreenUpdating = False '****Establish the file BatchRecords to put the data into sfile =...
  6. C

    Closing a workbook in VBA

    OK, I can get VBA to open a workbook, but I can't seem to get it to close the workbook. What am I doing wrong? Workbooks.Open NewerFile opens the workbook perfectly, but neither of these work to close it: Workbook.Close NewerFile Workbooks(NewerFile).Close Thanks for the help!

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