workbooks.open

  1. syndee

    Updating links with auto updating

    My Control File contains several worksheets. It links to data in other files in same folder. Just having problem with updating links with auto updating and returning to Control File.xlsm Tried this but need files to save and close except Control File.xlsm after updating. Is that possible...
  2. R

    Startup script (workbook_open) doesn't run

    I have a workbook which contains a startup script which works when opening this workbook manually. Now this is a viewer and is sometimes changed by an other VBA script. People who use this viewer sometimes need to refresh this document without saving. The script below is written to reopen the...
  3. R

    Worksheet Re-Activate Issue

    I am receiving an error at the Sub Macro2 script for the line of code: "Workbooks.Open Range("N12"). Value where it tells me that it is N12 empty. How can I reactivate the sheet to pull the file name variable in the file I wrote code in N10, N12, and N14. N10 works as the sheet is activated...
  4. B

    VBA Help with Workbooks.Open not working..

    Hi I have this code to open up a file which works when it's an excel doc; Workbooks.Open Filename:="\\servertest\Test Administration\Department Name\Dashboards\Test 1\Book1.xlsx" But doesn't work when it's a word doc (run-time error 1004) with this code; Workbooks.Open...
  5. D

    How do I open a non excel file from within VBA?

    Hi all, So I'm using a userform to open a particular file via a vlookup from 2 combobox inputs. However, it won't work with non excel files. Can anyone help me with this? I use the following code: Private Sub OkButton_Click() Dim loc As Variant loc = Application.VLookup(Me.ComboBox2.Value...
  6. V

    Workbook check - exist or not

    Hi All, Im getting an error on red line. Error - Invalid inqualifier. can any one please help If myFileExists("\\inmum-i-fs4\group$\WNA Skyline\Common\" & Uname.xls) Then Workbooks.Open Filename:="uname.xls", UpdateLinks:=False Worksheets(Uname).Select Else Set NewWb = Workbooks.Add...
  7. Small Paul

    Open Workbook With Most Recent Date in Filename

    Hi I have a number of files saved each day, with either the current date or previous working day date in the filename. To open yesterday's workbook is now no problem: Workbooks.Open Filename:= _ "Z:\Secondary Market\Pricing\Daily Index Levels\Index Levels " & Format(Now() - 1...
  8. A

    Macro syntax

    Hello, I am trying to set a variable that I can use throughout my macro. The variable is the filename with its associated path. So far, Ive been succesfull in setting the variable and using it in certain objects, but not in others. The code is as follows: Sub ScorecardImporter() Dim...
  9. D

    VBA to open another abc.xltm file so that it opens as abc1.xltm

    Hi Folks, I wish to open another excel spreadsheet via vba; however, the spreadsheet in question is a *.xltm file. Currently I have this code to open a workboook: Sub openwb() Dim sPath As String, sFile As String Dim wb As Workbook sPath = "C:\Users\dougmarkham\Desktop\"...
  10. A

    Workbooks.Open and Localisation

    I have created an Excel dashboard that uses VBA code to import data files in csv format. The data includes dates, and since I and other users are European I had to add the "Local:=True" parameter to my Workbooks.Open command to avoid certain European format dates being converted into US date...
  11. N

    Vba macro to update slave wb when changes are made on master wb

    Hello, I created a macro that opened & updated links on a password protected master wb linked to 10 slave wb. See link below: https://www.mrexcel.com/forum/excel-questions/1058125-vba-macro-opening-updating-password-protected-excel-workbook.html My current issue is... when I make changes to...
  12. B

    Programmatically opening Excel followed by Workbooks.Open fails

    Hi, I've been working on some VBA in MS Word to that requires access to information in an Excel workbook. I'm having trouble when Excel is closed before my procedure is called. I'd like to avoid dependence on the user opening Excel before the application is used; consequently, Excel may or may...
  13. M

    please help me to find the error.

    <code class="vb keyword" style="white-space: nowrap; padding: 0px !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; color: rgb(0, 102, 153) !important; border-radius: 0px !important; background: none...
  14. K

    Excel cancelling Step-Into following Open.Workbook

    Greetings all, Version: Excel 2013 Having a frustrating little issue I don't know how to resolve. Whenever I enter Step Into mode of my Excel VBA script, it gets to a line that opens a workbook template for editing, and then instead of returning to step into it runs through the rest of the...
  15. M

    Wildcard with the workbooks.open function

    Hi there, I am using the wildcard in the filename for the workbooks.open function. In Excel 2013 it works fine, but in Excel 2003 (which we also use) then it does not work. Should this version be a problem? The code I use is: DataWkBkName1 = prodNumberIn & "_ac_rev-?_DTS Inner 12...
  16. W

    Loop not appropriately opening file paths

    Hello! I have a list of file paths in a workbook, in cells A1:A307. I would like to open some master data files, then open the files listed in Column A one-by-one, update formula values that are referring to the master data files, save them, and then close them. If the file is unable to be...
  17. C

    VBA Workbooks.Open - If Already Open?

    If I use Workbooks.Open "My File Name" and the workbook is already open, will it re-open the file (wasting time for a large file) or will it just do nothing since the file is already open? I tried running Workbooks.Open ThisWorkBook.FullName in the immediate window and it seems like nothing...
  18. W

    VBA: Skip file path that cannot be found

    Hello! :) I have a number of file paths listed in Column A of Sheet1 that have to be opened and saved daily. There are formulas in these sheets that are linked back to other data sheets that should remain open the whole time. However, the current macro I have fails to a full stop if one of the...
  19. N

    Set a reference to another workbook

    Hi all I have the following code Workbooks.Open FileName:="C:\Sports\Golf.xlsm" which works fine, however, as the the workbook is already open all I want to do is set a reference to it so I can write to it later. This gives a "Subcript out of range" error (Sportbook is dimmed as a workbook)...
  20. U

    Error Handeler for Workbooks.Open delay?

    I have a loop that goes through every xlxs & xlsm file in a SharePoint folder but every now and then it hangs while opening a random workbook. It can run fine most of the time but other times it hangs. This is the command I use to open the file: Workbooks.Open...

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