open workbook

  1. D

    How to use VBA to close ThisWorkbook if the folderpath it's opened from is not the specified folderpath?

    Hi Folks, Have checked Google and come a blank on this one. Does anyone know if it's possible to use VBA---in a Private Sub Workbook_Open() macro---to check if the filepath that the file has been opened from matches a specified path, and if not, close the workbook? Kind regards, Doug.
  2. K

    Open woorkbook -active sheet -next cell

    I have been using the following code to open a workbook to a specific sheet and going to the next available row for data entry. It had been working fine. Then in the course of testing, It stopped working and I would get a "ws = nothing" error... Private Sub Workbook_Open() Dim ws As...
  3. H

    Need VBA code for open workbook - If already open, then activate

    Hi all, I am completely new here. I have looked over the forum and I have found posts, that related to what I am looking for assistance with. However I cannot get the solutions to work for me. Question: I have the below VBA code and it works a charm - It could probably be simpler, but it works...
  4. Small Paul

    vba to Open Workbook with Most Recent Date in File Name

    Hi All Firstly, many apologies, I know this has been asked and answered previously. Unfortunately I am not experienced (or intelligent) enough to make those solutions work for me! I am therefore asking about my specific situation. I save a daily .csv file in Sharesync with the previous...
  5. berty2000

    Excel 2016 Open another workbook and make Active

    Hi I have just upgraded to excel 2016 and Im having problems opening another workbook from a userform and making it the active one. It opens it ok, but you cant type anything unless you change to another sheet first then back again, it seems to still be active on the original workbook. Code...
  6. M

    Copy information from one Workbook to another conditionally

    Hi guys, I need to copy information that matches a provider name from one Workbook/[Provider Sheet] to another workbook where I need it to append certain columns of all providers information. So far I am using the code I found to choose the workbook/sheet/range from a windows and select the...
  7. S

    Force macro enabling to access the workbook

    Hi ! I'm looking for a solution to block a 20.worksheets.workbook acces if the user dont activate is macro first. And after activation then he will see and have acces to the full workbook.. ? Any solutions ? Thank you very much and have a great day! Steve
  8. J

    Opening a workbook declared as a variable in VBA

    I am trying to open up a workbook that is declared as a variable. Is there a way to do this by using the variable name? I'd rather not have to use the long file path name. In the code after I move "blanksheet" from "dailysales" to "monthly" the dailysales workbook will no longer be open, as...
  9. K

    VBA to open different Excel file - doesn't work in Office 365

    Hi Guys, I have a Excel file which has a macro to open multiple spreadsheets based on the location specified within macro. I used this file (and macro) for about a year and it was all good until we migrated to Windows 10 and Office 365. All other macros seem to be fine but the most important...
  10. andrewb90

    Check to see if another workbook is open in VBA

    Hello all, I'm looking to add some code to my opening procedure that will check if another workbook is open. I found some examples online, but they seem to look for a specific filename. Is there a way to look for any .xls or .xlsm file open? Thanks!
  11. A

    VBA code to activate file with current date in its name and if not found open, then open it from the location.

    Hi, I am trying to write one code. In this code, there is one file which I need to activate among the existing open excel files. Also if this file is not found open, I need to open this file from the given location without giving any error(I am not sure how to do this part). The objective is to...
  12. S

    Open File Dialog - Specified path

    I have a MAIN workbook and i also recieve daily data (in Excel format) that needs to be added to this Main workbook. This daily file is saved in a specific network folder. I'm looking for VBA to open the "Workbook Open" dialog box on a specified network path by default and to allow the user to...
  13. T

    VBA - Issues opening workbook with .xls extension but was saved from html

    Hello, I have a macro built to open a "source" workbook, copy and paste a range into a "master" workbook. The "source" file has the .xls extension, but when you open it you get the warning that its in a different format. Below is my code - its works fine if I have recently opened the "source"...
  14. 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")...
  15. C

    VBA to close workbooks

    Hi there, I have a macro which opens files based on the contents of a cell range. This cell range has the file names and the macro specifies the folder directory. The macro opens whatever cells are selected and then it closes all files. I want it to run as is but with one minor tweak - only to...
  16. G

    Copy/combine data from multiple workbooks

    Hello, I have multiple workbooks that I need to combine into one main master workbook. I have a macro already in place that opens/closes all the workbooks, I just need help looping through each open workbook and placing the data into my master sheet. See my progress below so far: My main...
  17. A

    Write x amount of values to next available cell based on another cell

    Alright I have a doozy for everybody. I have a master sheet that I copy information in from rep's tracking sheets for the work they do. I created a sheet that auto copies all of their sheets based on the file paths which I use another button to populate in row J. Everything is working swimmingly...
  18. M

    cant open workbook

    Hi, Please help me with this. I keep on getting application/ object not defined error messages. I have no idea how to fix it, as I dont know what I did wrong. Thanks. Best, Morris Here is my code: Dim wb As Workbook Application.ScreenUpdating = False Set wb =...
  19. B

    Save and Close Workbook

    Hello Everyone. I hope someone will be able to assist me with this issue. Each time I open my Ms Excel Workbook it shows the sheet it was on before it was closed. What I want to do is, on the click of a button, it will do three things: 1. save the file. 2. Return to a main page 3. Close the...
  20. C

    Opening a workbook

    I'm trying to open an excel workbook and read the data from sheet1. when it gets to the "With Workbooks(xyz).sheets(Sheet1)" it gives me an error "Run-Time error '9': Subscript out of range. Also when I try and close the workbook, it gives me an error. Any help would be appreciated. Danka...

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