workbook close

  1. S

    vba: How long workbook was active

    Hi I'm looking for a vba code to monitor the time spent since the workbook was opened. I want to track the time from opening the sheet till it was closed and create a log for such event.
  2. R

    Can't Close WorkBook after I Copy Information

    Hi guys, Im new in the VBA What I'm doing is opening a few files to copy the information of each of that to a main file, Im doing this after open a USERFORM with a button in the USERFORM What I cant do is tell VBA to close the source files, it give a RUNTime Error 1004, Method Close of Object...
  3. J

    Excel crashing when closing workbook in VBA

    When I run this code, Excel will crash when it reaches the last line, i.e where I close "document2". Any thoughts? I've used similar code before and it has always worked. Option Explicit Sub DAILYSALES_END() Dim rownum As Double 'save document1 at temporary location...
  4. S

    Preventing multiple Excel instances

    Hello MrExcel-Forum, there once was a computer, who at certain times, ran a batch-file via the task-scheduler, the batch-file starts an xlsm-file, and the xlsm-file used "thisWorkbook.close false" at the end of their vba (in workbook.open. the "false" means that changes are not saved). there...
  5. A

    vba code to close all workbooks except active workbook which has macro

    Hello, Trying to figure out the vba code which can help me to close all opened workbooks except the active one which has macro. Below is my code. But it does not close any workbook. Please help. Thank you in advance. Sub CloseOtherWorkbook() Dim WB As Workbook Windows("Master...
  6. V

    Workbook Close Hangs in Excel 2013

    I am copying from one workbook to another. This code works fine in Excel 2007. However, it freezes each time in 2013 on the .Close portion. Any idea as to why this would happen? There is no issue with the path, and this code has been run hundreds of times in the previous version of Excel so it...
  7. A

    Newbie VBA- Close Variable Defined Workbook

    Hello all I started to learn VBA code on Excel 2010 10 days ago and have "successfully" written the following basic code: This works great for what I need it to do except for the final line :( For the life of me I cannot seem to be able to close the variable defined workbook....I always get...
  8. C

    Workbooks.Close and Open??

    2003 / w7 Things have been going swimmingly and then..... I used the Workbooks.Open FileName = Application.GetOpenFilename(fileFilter:="Excel Files (*.xls), *.xls") MsgBox "You selected " & FileName If FileName = False Then Exit Sub Workbooks.Open FileName:=FileName...
  9. Colin Legg

    Excel 2007 RibbonX Crashes Excel When Workbook Is Closed

    Hi, Using Excel 2007, I have an .xlsm file with a custom ribbon tab containing Button and Separator controls. Quite frequently, when the workbook is closed, Excel crashes. I think there is a problem when the customised part of the ribbon is unloaded. The workbook does not contain...

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