+ Reply to Thread
Results 1 to 3 of 3

IF Statement to not follow a procedure of sheet is Hidden

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-08-2015
    Location
    NJ
    MS-Off Ver
    2013
    Posts
    205

    IF Statement to not follow a procedure of sheet is Hidden

    Hello, am trying to finalize a macro that will include ability to re-run, however after the first time the macro is run, it hides and protects a sheet that no longer needs action. When running a second time, the code looks for that sheet (so obviously errors out there) to perform an action already completed.

    With that, am looking for assistance with code to say, something like, if sheet.abc is hidden, do not Call Macro123, else Call Macro123. This could help for running both the first and then subsequent runs.

    Hope that makes sense. Thanks in advance for any assistance.
    Sheryl

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: IF Statement to not follow a procedure of sheet is Hidden

    Hi Sheryl,

    To check whether the sheet is visible...

    If Sheet2.Visible = xlSheetHidden Then
    
    'Do Nothing
    
    Else
    
    Call Macro
    
    End If
    Last edited by jeffreybrown; 04-26-2019 at 01:06 PM.
    HTH
    Regards, Jeff

  3. #3
    Forum Contributor
    Join Date
    08-08-2015
    Location
    NJ
    MS-Off Ver
    2013
    Posts
    205

    Re: IF Statement to not follow a procedure of sheet is Hidden

    Thanks for the quick response.

    Sheryl

+ 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] Macro to follow this simple procedure
    By ricdamiani in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-29-2016, 07:45 PM
  2. VBA Ok Click() If Statement Procedure Too Long
    By LukeAM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2014, 06:59 AM
  3. [SOLVED] IF statement in sub procedure (syntax ?)
    By MaddyG in forum Excel General
    Replies: 7
    Last Post: 06-21-2012, 09:14 PM
  4. [SOLVED] How to end a procedure after an If-Then statement
    By ATLGator in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-19-2012, 02:23 AM
  5. Help with Follow Hyperlink VB Statement
    By Ben Matthews in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2009, 12:09 PM
  6. VBA Function Vlookup data from Hidden sheet in hidden workbook
    By wotadude in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-16-2008, 11:22 PM
  7. Shortcut Key to follow a Call'ed Procedure
    By Neily in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2006, 09:15 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