+ Reply to Thread
Results 1 to 8 of 8

Error Trying To Hide Workbook

  1. #1
    Forum Contributor
    Join Date
    06-15-2009
    Location
    Ontario, canada
    MS-Off Ver
    Office 365
    Posts
    371

    Error Trying To Hide Workbook

    I am trying to hide an 2nd open workbook with this VBA code:

    Please Login or Register  to view this content.
    It results with an "Object doesn't support this property or method." error.

    Adjustng the code to this gives the same error ...
    Please Login or Register  to view this content.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Error Trying To Hide Workbook

    Hello Jenn68,

    Please see Here.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Error Trying To Hide Workbook

    It's Windows(1), not Window(1).
    Rory

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Error Trying To Hide Workbook

    mistakenly posted.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  5. #5
    Forum Contributor
    Join Date
    06-15-2009
    Location
    Ontario, canada
    MS-Off Ver
    Office 365
    Posts
    371

    Re: Error Trying To Hide Workbook

    Thank you again Rory.
    What is the purpose of "windows(1)" in comparison to the the solution posted by Winon in which it is excluded. In that case workbookname.visible=false seems adequate (although didn't work in my case).

  6. #6
    Forum Contributor
    Join Date
    06-15-2009
    Location
    Ontario, canada
    MS-Off Ver
    Office 365
    Posts
    371

    Re: Error Trying To Hide Workbook

    Posted in error
    Last edited by Jenn68; 03-12-2019 at 03:29 PM.

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Error Trying To Hide Workbook

    That code loops through the Windows, so it's basically the same method you are using, except it does all inactive workbooks.

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Error Trying To Hide Workbook

    @ rorya,

    Well spotted Rorya, I missed that.

    @ Jenn68,

    Glad to see your issue had been resolved!

+ 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. [SOLVED] IF to hide an error #NUM!
    By Alfredim in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-09-2016, 09:27 AM
  2. [SOLVED] #DIV/0 error - don't want to hide the error, need to work around it
    By RamJacCorp in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-28-2015, 07:07 PM
  3. #N/A Error hide - help?
    By jacko058 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-27-2015, 04:39 AM
  4. Trying to hide #VALUE! error
    By Buffco in forum Excel General
    Replies: 4
    Last Post: 09-09-2014, 11:32 AM
  5. [SOLVED] Hide the Div/0 error?
    By Vermilion in forum Excel General
    Replies: 10
    Last Post: 04-11-2012, 11:17 AM
  6. hide #N/A error
    By tsioumiou in forum Excel General
    Replies: 7
    Last Post: 05-13-2010, 08:02 PM
  7. Hide #Value! when error
    By AmazingTrans in forum Excel General
    Replies: 5
    Last Post: 03-23-2009, 03:29 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