delete a workbook

  1. J

    how can I wirte code to delete only xls extension file from current workbook's location?

    Sub Deleteexcel() 'You can use this to delete all xls files in the folder Test On Error Resume Next Kill Application.ActiveWorkbook.Path"*.xls" On Error GoTo 0 End Sub I have code above that is trying to delete every file with xls extension. I have wrong syntax, but no idea...
  2. T

    Deleting a file in SharePoint

    Hello I have a macro which pushes out the current excel workbook that I am in to various different SharePoint sites. I would like to be able to delete the previous version of the file. I have the name of the previous file stored in a variable called 'OldFileName'. I check that the file exists...
  3. J

    Delete Old Backup copies after new back up is created and saved

    I have this code that I got from another source and what I am trying to do is delete the old copies of this back up so that there is only the most recent backup copy. If you could point me in the right direction that would be greatly appreciated. Thank you Private Sub Workbook_BeforeSave(ByVal...
  4. N

    VBA - Undo save, i.e. delete a file that has just been saved and open original.

    Hi guys, These are my Subs: Sub Undosave() Application.ScreenUpdating = False Application.OnTime Now, "Undosave2" ThisWorkbook.Close SaveChanges:=False End Sub Sub Undosave2() Application.Workbooks.Open ("C:\Users\Seth\Documents\Costing Program\Process Costing\Process Costing Updating")...
  5. C

    Need Help Deleting Workbook After Copying Cells

    Hello all I have been new to VBA and have been working in it for about 2 weeks. I am trying to aggregate a data set from a folder with multiple workbooks into a single workbook. The code bellow does that but I also want to delete the copied workbook after it is placed in the "Master workbook"...
  6. G

    Close a specific instance of Excel (undesired) with VBA

    Hi all,</SPAN> It has been two full days that I’m trying to solve this issue, but no lack so far. My knowledge in programming with VBA are limited, so I hope you know how to solve this.</SPAN> Basically, I open a program as an object with VBA and I pass to this object some date. The program...

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