close file

  1. F

    Open specified source and destination files and copy single cell value, continue until all values copied

    Hey guys, I am facing an issue where my excel knowledge comes to an end. I already have a macro to get file names from a folder and rename the files according to a New File Name. I now have one source file that contains a column with values. I need to copy each one of the values into a...
  2. L

    VBA copying range from CSV directly imto master workbook

    Hi all. Bit rusty on this VBA stuf. 1. I need to copy a range from CSV file and hoping to do that by going directly to the master workbook. 2. Close CSV workbook only. 3. Activate master workbook. the macro runs but have to (2) manually and wish to eliminate this manual task. The macro is run...
  3. F

    Open / Close Workbooks Sequentially

    I have a large number of Excel files that I need to open, wait for their opening sub to run, and then close. Then on to the next one in the list. etc. Currently, I'm doing this with a .bat file that simply lists the file names. It's pretty easy to manage. But, the disadvantage is that I have to...
  4. T

    Get filename from .txt so I can close it later?

    Hi I have code that will open a text file (don't know the name it will be but will be the only one), but I need to figure out how to get that file name so that I can use it to close the file later on. Workbooks.opentext Filename:="*.txt", Origin:= _ xlMSDOS, StartRow:=1...
  5. S

    Closing opened files (also non-xlsx) with VBA

    Hello I use the IsFileOpen function from VBA Express : Excel - Check If a File Is Already Open to detect if a certain file (pdf or xlsx) is open. How can I close a pdf or xlsx file that is currently opened? What I want to achieve: for each objFile In objFolder.Files If...
  6. T

    Close a particular Workbook.

    I have a form that the user browses to a workbook and imports all data from columns and then once the workbook that was opend is finished with it closes. however if the user closes the userform with the red X id like the workbook that was opened to close. I want to exclude the workbook that we...
  7. M

    Resolved: What if the file i want to delete has already been deleted ("kill" macro)?

    I'm using the following macro: Private Sub Workbook_BeforeClose(Cancel As Boolean) Kill "T:\usequty\Audit Reporting\T-Cross Reports\tcross.xls" End SubThe marco is working well, but it is very possible that the file has already been deleted. In such cases, I do not want the error to come up...
  8. S

    ActiveWindow.Close without popup?

    ActiveWindow.Close The above code in my macro. When I use this command, it has a popup that asks me if I want to save my changes. I want it to not give me the popup and just close the file. I do not want to save my changes. is there a command I can use that will just close the active...
  9. zakasnak

    Help! Where does this code go?

    Do I put this in the worksheet tab "View Code"? That's where it would make sense to me.... I can't tell that it's working, tho. Private Sub Workbook_Open() <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p> Dim Start, Finish, TotalTime...
  10. D

    Macro not running on other computers

    I have a macro that I created on my desktop and it works perfectly well. I sent the file to another co-worker and it fails. The macro basically opens another excel sheet, copies a few things, pastes them in the spreadsheet where the macro resides and then closes the other opened document. The...
  11. S

    How to run a macro after user has chosen save "yes"/"no" upon closing file

    Hi all, I'm making my first moves in the excel macro world, and having the following difficulty: I have an excel sheet in which I build in some checks and macros, so therefore I need to ensure that users execute macros when opening the file. I looked around on the internet and found that...
  12. E

    Close file that was inserted in excel as object as an icon

    I need some help on a VBA code. I want to insert other files in an excel file which is displayed as an icon and give the icon a specific name. I used this code: Dim fn fn = Application.GetOpenFilename If fn = False Then Exit Sub End If name = InputBox("give the file a name")...

Some videos you may like

This Week's Hot Topics