workbook_open

  1. G

    Help with vba code placement please

    I have been trying to get this to work in cell "Q4" all morning. I have put it every where in thisworkbook, Legend, and in a new module. Cant get it to work in cell "Q4" of the Legend. This is the formula I am useing. Private Sub Workbook_Open() Sheets("Sheet1").Range("Q4").Value =...
  2. S

    VBA workbook_Open problem

    I am looking for vba to prevent workbook_open from executing in new save as file without changing the original file. I have a template that I open with a workbook_Open module to auto generate a sequential number. I want to save the new file to a different location with a new name but I dont...
  3. J

    VBA: Log Users with Workbook_Open event

    I have a small piece of code that will log: Application.UserName Environ("username") Format(Now, "yyyy-mm-dd hh:mm") My question/problem is, I want to run this code, and then save the workbook. So this information will be saved even if the user closes workbook without saving. Here is what...
  4. J

    This Workbook Startup Tab

    Hi all, I have a spreadsheet upon opening, it comes up with a message. I also want the spreadsheet to open on a specific tab, if I put it below the message, it doesn't work (see below). Please advise thanks JJSB PrivateSub Workbook_Open() <code style='margin: 0px; padding: 0px; border: 0px...
  5. S

    Debugging VBA Code

    We are trying to Debug/verify code as part of our validation process simple spreadsheet code to auto lock on open and auto lock and save on close Option Explicit Private Sub Workbook_Open() Dim i As Long ThisWorkbook.Unprotect SheetPasswrd Application.WindowState = xlMaximized...
  6. V

    Combine Workbook open events

    Hello, I figured out my last post to make a drop down list default to a certain choice when opening up excel. However I could not edit my post to state so and then ask my follow up question that I have to now to complete my workbook for users. My question is as follows: How can I cobble...
  7. S

    VBA Run-time error 1004 when auto-filtering

    I have a shared workbook with frozen frames and autofilters. You know what's coming next ... yes, other people frequently leave filters set, and that messes things up when the next person comes along, takes the filters off, and now the first umpteen rows are frozen and they can't scroll. So I...
  8. A

    Workbook_Open event Created via VBA doesnt persist after closing and reopening file

    I am creating an .xls file via VBA and making it protected I need to add workbook_Open event for this workbook. I have added it using the below sample code Sub CreateEventProcedure() Dim VBProj As VBIDE.VBProject Dim VBComp As VBIDE.VBComponent Dim CodeMod As...
  9. M

    SharePoint based file - Workbook_Open not firing

    I have a file that is in a SharePoint folder and when opened from the Excel application the workbook_open code doesn't execute. When the file is open I can open the VBE and manually run it (F5 form within the code) but why won't this execute upon opening? When opened, if the yellow bar pops up...
  10. M

    Workbook_Open not executing from Personal workbook

    Excel 2013 64-bit I have procedures to add right-click menu options that I want to call whenever a workbook is open. The code is in the ThisWorkbook portion of personal.xlsb. Private Sub Workbook_Open() AddShortCuts AddNewVBEControls End Sub However, the code is not executing when i...
  11. Nelson78

    Open a new workbook and activing formula only in a sheet

    Hello everybody. When I open the workbook, I need to inactive all formulas except in a specific sheet. I've composed the following code, but unsuccessfully. Private Sub Workbook_Open() Application.Calculation = xlManual Application.CalculateBeforeSave = False Worksheets("Second...
  12. M

    workbook_open stopped working

    <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--> Hello everybody, I recently run into a problem with workbook_open. The code has been successfully running for years. Now if I open the file nothing happens. Or almost...
  13. A

    Environ and EntireRow.Lock to unlock rows owned by Environ User upon sheet select and lock others.

    Hello Excel gurus, Can there be a combination of code that will: 1. Get Environ("username") in memory 2. Paste said username into an edited row cell at, say, A5 when any in B5:X5 is edited, down to each potential row 1000+ 3. Check current Environ username against all rows with Pasted username...
  14. C

    Is program Running, if Not Run it.

    Hello all, I have spent some time searching but couldnt come up with an answer. I would like excel to check on workbook_open if a program called nosleep.exe is running. If so then continue with the rest of the code if not then run the program c:\nosleep.exe Many thanks for any help
  15. G

    VBA Workbook Open doesn't run after Enable Content prompt

    I have a situation where I save a macro-enabled workbook to a untrusted folder (like my users will probably do). When I open the file from Excel (most recent list or File > Open), the file opens and I get the warning banner and click Enable Content. I have a "Hello World" msgBox at the top of...
  16. C

    Combobox change event and workbook close/open

    I hope I can explain this properly. I have a combobox_change sub that amends two fields depending on the value of what's selected. Those fields, however, are unlocked and able to be overwritten by the user. The problem is that this change event seems to be running upon either workbook close...
  17. PritishS

    Disable all Add ins at excel startup

    Dear Sir/Madam, Greetings!! I have been looking for the solutions for last 2 days and spent almost 36 hrs on my laptop..:stickouttounge:. But no luck. Requirements: 1. I have a file named PROJECT.xlsm 2. In my system I have few Add-ins (both COM Add in and Excel Add in) like RDB Merge, Nitro...
  18. M

    Workbook_Open not working!

    Hi all, I have a shared workbook which I would like my collegues to keep open at all times, and they can add information to it via a userform. In order to ensure there aren't any data clashes, they have to "refresh" the sheet before adding which uses this simple code: Sub Refresh()...
  19. M

    Workbook_Open when ActiveX not yet enabled

    I have a workbook with ActiveX controls that works fine. There is a Workbook_Open code in ThisWorkbook. The problem is when another user opens the workbook for the first time. The user receives the security message for enabling ActiveX controls but, at the same time, the Workbook_Open routine...
  20. L

    Choose between two macros in workbook_open event

    I have a workbook (wb1) with formulas, that saveas' itself into a new workbook(wb2) with only values. I have alternate macros that I need to run based off each workbook type (formulas vs. values). I would like to create a mechanism based off of a workbook_open event that looks at the...

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