Results 1 to 7 of 7

Thread: EXCEL 360 vba code print hidden excel sheets

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Mar 2020
    Location
    France
    Posts
    9
    Location

    Angry EXCEL 365 vba code print hidden excel sheets

    Projet test 1.0.xlsm



    Good morning all,
    I have a problem with my excel file at the time of printing.
    My sheets are hidden.
    I use this code to print the sheets hide


    Private Sub print_Click ()
    Dim Fe As Worksheet
    Application.ScreenUpdating = False
    For Each Fe In Worksheets
    If Fe.Visible = xlSheetHidden Then
    Fe.Visible = xlSheetVisible
    Fe.PrintOut
    Fe.Visible = xlSheetHidden
    End If
    Next Fe
    Application.ScreenUpdating = False
    End Sub.
    But impossible to print the sheet that I select in the UserForme.
    This prints the three sheets visible in the ListBox.
    I am a noob in VBA I do not understand where the error in the codes is.
    I need your help
    Thank you in advance.
    Last edited by hokousai; 03-15-2020 at 07:46 PM.

Posting Permissions

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