Afficher colonne non contigues dans UserForm

Bonjour le forum

J'ai placé en pièce jointe un fichier contenant un "UserForm" affichant une feuille

Je voudrais savoir comment faire pour ne faire qu'afficher les colonnes suivantes, svp

colonnes : A, O, P, Q, R, S et X

D'avance je vous remercie pour votre aide et votre disponibilité

14tableau.xlsm (32.56 Ko)

Bonjour

Je ne parviens pas à ouvrir ton fichier...

Bye !

Bonjour gmb

merci pour ton aide et ta disponibilité

en fait j'ai ajouter une commande complémentaire dans la boite à outils

Spreadsheet

J'ai téléchargé OWC11.EXE chez microsoft afin de faire une mise à jour

et j'essai d'adapter le code pour faire apparaitre que les colonnes qui m'intéressent

voici ci-dessous le code

Sub UserForm_Initialize()

Dim Cellule As Range

    Me.Spreadsheet1.ScreenUpdating = False

    Me.Spreadsheet1.ActiveSheet.Rows().Interior.ColorIndex = xlNone

    With Me.Spreadsheet1.ActiveSheet

        .Columns(1).HorizontalAlignment = xlLeft      'colonne A
        .Columns(15).HorizontalAlignment = xlCenter   'colonne O
        .Columns(16).HorizontalAlignment = xlCenter   'colonne P
        .Columns(17).HorizontalAlignment = xlCenter   'colonne Q
        .Columns(18).HorizontalAlignment = xlCenter   'colonne R
        .Columns(19).HorizontalAlignment = xlCenter   'colonne S
        .Columns(24).HorizontalAlignment = xlCenter   'colonne X
        '.Columns(9).HorizontalAlignment = xlCenter
        '.Columns(10).HorizontalAlignment = xlCenter
        '.Columns(11).HorizontalAlignment = xlCenter
        '.Columns(11).Locked = False
        '.Columns(12).HorizontalAlignment = xlCenter
        '.Columns(13).HorizontalAlignment = xlCenter
        '.Columns(12).NumberFormat = "0.00"" Kg"""
        '.Columns(13).NumberFormat = "0.00"" M²"""
    End With

    For Each Cellule In ThisWorkbook.Sheets("Nomen").Range("A1:X" & ThisWorkbook.Sheets("Nomen").Range("A65536").End(xlUp).Row)
        Me.Spreadsheet1.Cells(Cellule.Row, Cellule.Column) = CStr(Cellule.Value)
        Me.Spreadsheet1.Cells(Cellule.Row, Cellule.Column).Borders(xlEdgeRight).LineStyle = xlContinuous

    Next Cellule

   With Me.Spreadsheet1.ActiveSheet.Rows(1)
        .Font.Name = "Verdana"
        .Interior.ColorIndex = 15
        .Font.ColorIndex = 13
        .Locked = True
        .HorizontalAlignment = xlCenter
        .Font.Bold = True
        .Borders(xlEdgeTop).LineStyle = xlContinuous
        .Borders(xlEdgeTop).Weight = xlMedium
        .Borders(xlEdgeBottom).LineStyle = xlContinuous
        .Borders(xlEdgeBottom).Weight = xlMedium
        .Borders(xlEdgeRight).LineStyle = xlContinuous
        .Borders(xlEdgeRight).Weight = xlMedium
        .Borders(xlInsideVertical).LineStyle = xlContinuous
        .Borders(xlInsideVertical).Weight = xlMedium
    End With

    With Me.Spreadsheet1
        .ActiveWindow.ViewableRange = "$A$1:$X$" & ThisWorkbook.Sheets("Nomen").Range("A65536").End(xlUp).Row
        .ActiveSheet.Columns.AutoFit
        '.ActiveSheet.Cells(1, 1).Activate
        .ScreenUpdating = True
    End With
 End Sub
Rechercher des sujets similaires à "afficher colonne contigues userform"