• We are receiving reports of members using the private messaging service (Conversations) in ways that break the forum rules:
    • Do not invite another member to take the question off the forum (i.e. do not suggest that they post to a different forum, do not suggest that they email or private message you the problem, do not simply post a link to another forum, unless it is to a specific, relevant, thread). This applies equally to members asking or answering questions.
    • Soliciting business for yourself is not permitted. This is an all volunteer board, so offering solutions in exchange for compensation is not permitted. Likewise, members seeking solutions must not offer compensation for them. If you have an urgent need, check the Consulting Services page.
    Please help us out by clicking the Report link on any messages you receive that violate these rules. Thank you
  • If you would like to post, please check out the MrExcel Message Board FAQ and click here to register.
    If you forgot your password, you can reset your password.


  1. B

    Keep userform open when closing other workbooks

    Hi all, I have a userform that opens automatically and hides the workbook when I open the file. It all works perfect - and I have it as vbModeless in order that I can use excel for other things. Problem is, when I close the other workbooks, it also closes the userform and workbook that I want...
  2. C

    XLSM Sharing Question

    Good Afternoon, My question is related to an XLSM file that is shared on a network drive. I have built a Purchase Requisition form in vba that creates an auto-updated number. Currently when one user opens and starts to complete the form, another user can open and it would have the same...
  3. H

    VBA Code to copy all files from Folder 1 to Folder 2

    Hello Friends, I am using the below code to open folder 1 Sub OpenFolder()Dim str_folder As String str_folder = "C:\Users\i ' M\Desktop\Folder 1" Call Shell("explorer.exe " & str_folder, vbNormalFocus) Copy End Sub I want to open folder 1 > copy all files from this folder to folder 2...
  4. S

    Open csv file using VBA

    Hi, I have a set of .csv file with date time format in a specific folder. I have to open an excel workbook using a date and time picker with start and end date. What all steps should be carried out for this. Anyone...... please help....!!!!
  5. T

    Run formula if text is found in a cell.

    Good day all I'm trying to add a clause to a formula. What I want is to check cell L2 and only if it finds the word "open" then run the following formula. Any help is greatly appreciated. TIA =IF(ISNUMBER(SEARCH("Not used",E2)),"",IF(TODAY()=E2,"Today",IF(TODAY()>E2,"Past...
  6. D

    Close Active window triggers before close event

    I have an excel workbook with 2 views open (View/New Window). When I close the second window (the workbook remains open) it triggers the before close event. Is there anyway of closing the second window with triggering the before close event? I only want the before close event to trigger whe the...
  7. I

    Open userform when worksheet opens

    Morning, My goal is when i open the workbook i should see INCOME (1) open & either show the userform or not depending on cell value in B1 What i see happening is if i was last on worksheet INCOME (3) then i save & close the workbook when i next open it the code runs BUT when i close the...
  8. S

    Pulling data from multiple .csv files

    Hi - any idea how to vlookup or sumif or ... from multiple .csv files into one master file? The master and .csv files would be saved in the same location, and the filename of each .csv would be stored in a cell in the master file. The .csv files would not be open when the master is open (and...
  9. D

    Keeping open the notepad

    Hey guyz, I am working on VBA environment, would like to keep my notepad open all the time without switching the active screen. Is there any way we can do this ? Dinesh S
  10. C

    Use IF THEN ELSE to deal with file already open

    Hi. I can open a file remotely but am trying to create an error handling routine where, if the file is closed, open and update the links. If the file is already open it gives a FileInUse error and gives you the option to open it as read only I have been messing around with some code and ended...
  11. M

    ODBC Microsoft Access Driver Login Failed

    Hello All, I have an excel workbook which is linked to an Access Query via the Data>Get Data Essentially, each morning, as new data becomes available I right click and hit refresh and it updates for me. The past couple of days I have started to receive the following: "ODBC Microsoft Access...
  12. B

    Open Outlook When Excel opens

    I have a workbook that has a few outlook functions built in to it but outlook needs to be open the way the codes are written. How do I get Outlook to open when this file opens? I know the code has to go in the ThisWorkbook section of the objects. Thanks in advance
  13. K

    Default to Automatic calculation

    Recently and inexplicably any new workbooks that I open default to manual calculation. I read a few message boards and they said that the solution is to put a workbook in the XLSTART folder that s set to automatic calculation. This works, however any time I open an existing workbook it opens...
  14. P

    How to protect a workbook in windows

    I know how to protect a worksheet in a macro and also protect a workbook in a macro. But I don't know if it is possible to protect a workbook in windows. Let me explain. When I open up say drive F:\... on my flashcard, I see my workbook which I will call book1.xlsm. I want to be the only...
  15. M

    Open Access query via VBA and lock

    I have used the following previously to open a query in Access and then copy the data to a holding sheetrsQuery.Open strQuery, cnConnection, adOpenKeyset, adLockOptimistic I now need to use the same but stop anyone else from getting any of the records that are in the recordset so effectively...
  16. G

    Checked out Excel-file doesn't show in VBA Editor

    Hi all, I have have a code that will copy information from one workbook to the other. I have the Source workbook open, and it will show in VBA editor. When I check out a file (from a program at work) it will be saved in a local checkout folder on my computer and the file opens in Excel...
  17. G

    MAX Lookup Help

    I am working on a scorecard and for a portfolio section of it I want to either calculate or lookup the most recent dollar amount of total open loans of the officer in cell C7. The table below (Located in a separate sheet) is named "Port". The expected result is $52,000,000 (Adam, most recent...
  18. M

    Add Filename to the txt file

    I have a small script that logs when a user opens an excel file. Currently the username and date/time are populated in the txt file. I would like to add filename to the txt file, but not sure how. Thanks Private Sub Workbook_Open() On Error GoTo errhandler: Open "D:\Reports-Service\Old...
  19. M

    Open This Workbook.Path

    I'm having problems understanding how to designate a specific file path on this line of code. This works as long as the file is one folder before \old reports..... As soon as the file is moved the code no longer works. I would like to be able to hardcode a folder such as...
  20. J

    Someone else is using the file. Please try again later.

    I'm getting runtime error 1004 because someone else has a shared file open. When I open the file manually, it asks if I want to open it read only. But when VBA opens the file, it says Someone else is using the file. Please try again later. Then I get the 1004 error when I return to VBA. Why...

Some videos you may like

This Week's Hot Topics