+ Reply to Thread
Results 1 to 13 of 13

can I set a workbook to open in a certain view regardless of how it was when it was saved

  1. #1
    Registered User
    Join Date
    05-07-2018
    Location
    ontario, canada
    MS-Off Ver
    standard 2019
    Posts
    56

    can I set a workbook to open in a certain view regardless of how it was when it was saved

    Hi,

    I am wondering if there is a way to have a worksheet open to a standard view every time it is opened.

    I have a multi-page workbook that numerous people will be entering and saving data into. I want to have the workbook open up onto a page with command buttons that will link to other pages. All of the other pages will be hidden until the command button is pressed.

    When they are done the workbook will be saved and closed. The next time the workbook is opened I would like it to open onto the page with command buttons and the other page(s) to be hidden once again.

    Is this possible?

    Deb

    this is a link to the original post on the excel general board
    https://www.excelforum.com/excel-gen...t=#post5203247
    Last edited by Pepe Le Mokko; 10-10-2019 at 02:29 AM.

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    yes it is possible.
    you can write the commands in Workbook_Open

    Attachment 643650
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Registered User
    Join Date
    05-07-2018
    Location
    ontario, canada
    MS-Off Ver
    standard 2019
    Posts
    56

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    Quote Originally Posted by modytrane View Post
    yes it is possible.
    you can write the commands in Workbook_Open

    Attachment 643650
    Hi, the attachment doesn't seem to be working. Can you resend please.

    Deb

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    It is unnecessary to start a new thread in another forum if you think you posted wrong. Just PM a mod ( green usernames in " What's going on or via the Watre Cooler) to move your post.
    Thanks.
    Your other thread is now closed

  5. #5
    Registered User
    Join Date
    05-07-2018
    Location
    ontario, canada
    MS-Off Ver
    standard 2019
    Posts
    56

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    closing so I can repost with more information

  6. #6
    Registered User
    Join Date
    05-07-2018
    Location
    ontario, canada
    MS-Off Ver
    standard 2019
    Posts
    56

    want to have a workbook open in a certain view regardless of how it was when it was saved

    I have a workbook that has an intro page with several commandclick buttons that lead to other sheets. When a command button is clicked the relevant sheet is unhidden and the intro sheet is hidden so that only on sheet is available in each session.

    I would like to have the workbook open to the intro page with all other pages hidden every time the workbook is opened.

    I have searched the net and found many variations but nothing has worked for what I am looking for, so I am again turning to the experts.

    Hope you all can help.

    Deb

  7. #7
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: want to have a workbook open in a certain view regardless of how it was when it was s

    You need an Auto Open Macro.

    Either a macro in a normal module like:

    Please Login or Register  to view this content.
    Or a Macro in the This Workbook Macro Module.

    Please Login or Register  to view this content.

    Either Will run when you open the workbook.

    The Macro will be:-

    Please Login or Register  to view this content.

    Actually you might be better of using this code:=


    Please Login or Register  to view this content.
    Last edited by mehmetcik; 10-09-2019 at 06:22 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    @nicody
    Please stop creating new threads with the same title and that are the continuation of an almost similar thread.
    I merged both threads to keep things consistent.
    Please read our forum rules about duplicate threads.
    Thanks

  9. #9
    Registered User
    Join Date
    05-07-2018
    Location
    ontario, canada
    MS-Off Ver
    standard 2019
    Posts
    56

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    @ pepe le mokko

    I didn't get an answer to the previous post. I tried adding to the post looking for answers but got none. This is why i closed and restarted a new thread.

    Thank you for merging the 2 threads, I didn't know how else to get the help.

    D
    Last edited by nicody; 10-10-2019 at 09:55 AM. Reason: additional info

  10. #10
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    If you don't get an answer you can always "bump" your thread ( say once every 24hrs) eventually adding information .
    You got an answer from mehmetcik. Does it help?
    Your question seems clear to me (but I can't help with VBA), I suppose it got unnoticed for some reason

  11. #11
    Registered User
    Join Date
    05-07-2018
    Location
    ontario, canada
    MS-Off Ver
    standard 2019
    Posts
    56

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    Thanks for the help,

    I keeping getting a "compile error:variable not defined" at this line-

    For i = 1 To ActiveWorkbook.Sheets.Count

    I have entered the code into the thisworkbook area.

    When I save, close and reopen the workbook it is not opening to the intro page or hiding the others. I know this has to be something I'm doing wrong I just can't seem to figure it out.

    Any ideas?

  12. #12
    Registered User
    Join Date
    05-07-2018
    Location
    ontario, canada
    MS-Off Ver
    standard 2019
    Posts
    56

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    Thanks I will try the "bump" if I have trouble again.

  13. #13
    Registered User
    Join Date
    05-07-2018
    Location
    ontario, canada
    MS-Off Ver
    standard 2019
    Posts
    56

    Re: can I set a workbook to open in a certain view regardless of how it was when it was sa

    I cannot get this to work, I have tried removing potentially conflicting code and trying to simplify what I was trying to do but I just can't figure it out.

    Anyone else have any ideas?

    Thanks

+ 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. open workbook saved as the last business date
    By AndyM90 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2014, 09:44 AM
  2. Is it possible to open a Workbook saved on a website with a Macro
    By Carling73 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2013, 03:26 AM
  3. Run a saved query on workbook open?
    By GWB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-26-2010, 10:28 AM
  4. Save an open workbook, then open template workbook and close the saved workbook
    By ondvirg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-27-2009, 10:20 PM
  5. how to get data from saved workbook that is also currently open?
    By seron in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2007, 02:23 PM
  6. Set View to 75% upon Workbook open
    By John in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-15-2005, 06:35 AM
  7. [SOLVED] Unable to open saved workbook
    By CVS in forum Excel General
    Replies: 4
    Last Post: 02-06-2005, 01:06 PM

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