+ Reply to Thread
Results 1 to 5 of 5

VBA code for workbook open event

  1. #1
    Forum Contributor
    Join Date
    01-29-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    434

    VBA code for workbook open event

    hello Forum experts /Guru's

    We want a workbook open event VBA for my project

    where we check a particular sheet "setup"
    if in this sheet Colum B3 or c3 is <blank> then run SETUP sheet in opening of workbook

    if in setup sheet Colum B3 or c3 ihas any value then run HOME sheet in opening of workbook
    & SETUP SHEET is hide with xlveryhidden option


    my sheet is enclosed

    thank

    Santosh
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: VBA code for workbook open event

    Hi, Santosh,

    code goes into ThisWorkbook:
    Please Login or Register  to view this content.
    I wonder how you will alter the values in B3 or C3 due to the status xlSheetVeryHidden (okay, by using VBA or making the sheet visible again but thatīs not the question here).

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    01-29-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    434

    Re: VBA code for workbook open event

    Hello holger sir,, thank for ur code it's working as per my requirement..

    sir we make a setup page for my project where we enter only one time value i.e. District Name & Division name..... this will never change in future so we hide with xlveryhidden.. so that any other of my staff memeber can't open again setup file when we set a specific district & Divsion...

    Sir if u suggest one more thing which is is forgot to ask in main thread....
    i.e.

    We want to Setup Colum B3 & Colum C3 value in Home Page Colum A1 & B1

    Thanks
    We also add reputation ..

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: VBA code for workbook open event

    Hi, Santosh,

    add the line in blue to the exisitng code:
    Please Login or Register  to view this content.
    Ciao,
    Holger

  5. #5
    Forum Contributor
    Join Date
    01-29-2012
    Location
    India
    MS-Off Ver
    Excel 2016
    Posts
    434

    Re: VBA code for workbook open event

    thank you so much... sir we sloved my problem

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Disable Workbook Open Event Until Other Code has finished Executing
    By dgdgdg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2013, 05:36 AM
  2. Unable to get code to run a click event on workbook open
    By taylog2 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-05-2012, 09:39 PM
  3. WorkBook open Event
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2011, 06:02 PM
  4. WorkBook Open Event?
    By zplugger in forum Excel General
    Replies: 7
    Last Post: 12-10-2011, 02:28 AM
  5. Workbook open event
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2006, 06:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1