workbooks.open

  1. B

    Workbook.Open silently fails to function, execution continues - Totally baffled

    I am working on an Excel workbook (CollectorWorkbook) that is to open a series of about 5000 workbooks (DataWorkbooks) and collect data from specific cells in those DataWorkbooks. To do this, I want to use a UDF in about 30 cells of the CollectorWorkbook. I have used a similar approach to...
  2. D

    Wokbooks.Open() is closing Book1

    Hi all, I am very much a novice VBA programmer, and I am having a hard time figuring out why Excel is doing what it is doing. I have some code that is part of a user form. When the form opens, I open another Excel file that has the default settings for the form stored in it. After grabbing the...
  3. R

    Opening a Workbook from a File Dialog Box

    I would have thought that this should be fairly straight forward but I'm running into issues on opening additional workbooks from a userform. So yes, I have a userform with a button that when clicked opens up a number of additional workbooks. Is this a problem with the string sent to...
  4. L

    workbooks.open

    Hi The first code, I used workbooks.open without () and excel did give me error message. In the second code, I had to use () otherwise I will get error message. Why is that? Thank you so much. Sub wb_open_using_collection() Dim x As String x = InputBox("enter file name with path")...
  5. L

    workbooks.open with file browser

    Hi I want to improve the code below. I am thinking if it is possible to display file browser for the user to choose file from. Like when you click open in Excel, a file browser will be opened to help users to select a file. Can I do that here? Thank you very much Sub wbs_open() Dim xfile...
  6. 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...
  7. I

    accessing file remotely VBA code

    I have my xls with code on my desktop. The code needs to access a remote computer to open an excel file "items". How is this done? I tried a Z: and the following: Workbooks.Open Filename:="Z:\Fileserver\Admin1\Glen\101-061-909\Glen\price program\items.xls" but says could not be found...
  8. S

    Creating variables for file path names VBA

    I am writing coding for a rather large macro and I am trying to decrease the number of characters I use. One way to do this is to define a variable for the long file path name but it is not liking it. My coding is: ' Ask user for the period of the projection exercise PNumber =...
  9. G

    Open Close file with PW

    Hi Guys, I have a main excel file that has a indirect sumif formula linked to different protected files. Now, I want to open and close all files at the same time so that it would pull the correct sum without turning to #REF ! If I can turn the sumif formula to hard code values it would be...
  10. L

    workbooks.open - with or without ( )

    Hi I understand that workbooks.open returns a workbook object. So it returns something and because of that, I thought it should be call using ( ) for example workbooks.open("abc.xlsx"), but the author of this link https://analysistabs.com/excel-vba/open-close-existing-workbook/ called...
  11. J

    New VBA won't open file on Network Drive

    Hi folks tried this: Workbooks.Open Filename:="\\FS01\1300Shared\Marketing Folder\scorecard.xls" Error: Sorry we couldn't find \\FS01\1300Shared\Marketing Folder\scorecard.xls. It is possible it was moved, renamed or deleted. Also doesn't work using the Drive letter Workbooks.Open...
  12. T

    Open workbook without entire path

    Hello I open a workbook with the code Workbooks.Open ("\\Nas-bb\nas-2a\Quality Manager's Work Area\02 Laboratory Manual\10 Standard Inventory\C S O N H Standards.xlsx") Isn't there a more elegant way? Such as Workbooks.Open [C S O N H Standards.xlsx] Thanks for any help
  13. H

    Runtime error with exception handling

    In the following code I'm always getting a runtime error in the label file2 when it doesn't exist. As I've handled the exception it should technically proceed forward. When file1 doesn't exist, it's exception is always handled but an error always pops up in the file2 part. Sub testing()...
  14. Y

    Error in Loading DLL - CorelDRAW

    Hello, I have a decent understanding of vba, excel , etc... But am trying to run a macro that converts excel data into CorelDRAW. It had previously worked on my computer (august-september 2018), but when I try to run it now I get Run-time error '48' Error in loading DLL Specifically the issue...
  15. S

    Return Address of String in Closed Workbook with VBA

    I have almost 900 workbooks that I need to mine for data. These workbooks are nearly identical, but through the years the addresses for certain info has changed. I currently have a macro (below) which works nicely that opens each WB, looks for my defined string, and returns the location. For...
  16. D

    Password Protected File

    Hi, Is there any reason why this should not work: Workbooks.Open Filename:="S:\Stafford\Training Files\17. New_Training_Tracker\Template-Staff-Training-Manager-Database V1.2.xlsm", Password:="password", writerespassword:="password" I have also tried: Workbooks.Open...
  17. H

    Porblem to line

    Hi, How to resolve https://1drv.ms/u/s!Ai8CrEskdewXm1UXeAKPcd2mrkZJ due to last line below Workbooks.Open Filename:=fl fn = ThisWorkbook.FullName Debug.Print fn Application.Workbooks(fn).Activate
  18. J

    VBA add on query...

    Good afternoon - new here so please be gentle as i'm a total novice at VBA coding... I have a master spreadsheet that draws information from 3 password protected workbooks. In order to open then I have got the following code: Sub OpenSesame() Workbooks.Open Filename:="C:\folder\sub...
  19. R

    "Dir" problem

    Sub getCountryFile() Dim filePath As String filePath = "z:\allUK\EVR" If Len(Dir(filePath)) > 0 Then Workbooks.Open (filePath) Else Debug.Print "doesn't exist" End If End Sub Where filePath is valid, and the Workbooks.Open works fine if tried outside the...
  20. J

    manual open and workbooks.open macro producing different results

    Hello, I have two worksbooks, call them A and B. workbook A references cells in workbook B. When I manually open workbook B, the cells in workbook A update. When I insert code to open workbook B using Workbooks.Open, workbook B does open, but the cells in A do NOT update. I'm at a loss as...

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