Results 1 to 8 of 8

Surpress a Run-Time Error in Excel with a Dialog Box

Threaded View

groundin Surpress a Run-Time Error in... 07-08-2013, 02:24 PM
Norie Re: Surpress a Run-Time Error... 07-08-2013, 02:29 PM
groundin Re: Surpress a Run-Time Error... 07-08-2013, 03:41 PM
GaidenFocus Re: Surpress a Run-Time Error... 07-08-2013, 02:33 PM
Norie Re: Surpress a Run-Time Error... 07-08-2013, 03:48 PM
groundin Re: Surpress a Run-Time Error... 07-08-2013, 03:53 PM
Norie Re: Surpress a Run-Time Error... 07-08-2013, 04:11 PM
groundin Re: Surpress a Run-Time Error... 07-08-2013, 04:43 PM
  1. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Surpress a Run-Time Error in Excel with a Dialog Box

    Sorry you've lost me there.

    You are using the same criteria for all sheets and putting the name of each sheet that has A607 populated in an array.

    I think that checking what N is might be an idea.

    If it's 0 then no sheets have A607 populated.

    In fact I'd change the loop to this.
        For I = 1 To N
    
            With ActiveWorkbook.Worksheets(Arr(I))
                If .Visible = xlSheetHidden Then
                    .Visible = xlSheetVisible
                    .PrintOut
                    .Visible = xlSheetHidden
                Else
                    .PrintOut
                End If
            End With
    
        Next I
    If N is 0 then the code within the loop will never execute as you can go from 1 to 0.
    Last edited by Norie; 07-08-2013 at 04:50 PM.

Thread Information

Users Browsing this Thread

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

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