Validation

  • Initiateur de la discussion Daniel
  • Date de début
D

Daniel

Guest
Bonjour a tous!

J'espère que votre week end à été bon !

J'ai un problème avec l'option validation! J'utilise la validation sur une cellule. J'autorise la validation des données par rapport à une liste faisant référence à une liste nommé LISTEREF qui se trouve sur une autre feuille!

Problème : Quand j'ouvre le classeur, il ne m'affiche pas la liste déroulante!!!!!!

Pourquoi ????

Vous avez une idée?

Merci d'avance.
 

Tibo

XLDnaute Barbatruc
Salut Daniel,

Pour récupérer une liste d'une autre feuille dans une Validation, il faut effectivement la nommer

Ensuite, dans le menu Données / Validation,

Sélectionner

Autoriser

Liste

et taper =LISTEREF

ça devrait marcher

Revient si problème

@+
 
D

Daniel

Guest
Même avec la liste bien nommée ça ne marche pas. Enfin ça marche mais il doit y avoir une de mes macro qui fou la m.... car quand quand je reviens sur la feuille après une manip d'une macro, la liste déroulante disparait! Pourtant la fonction validation y est toujours avec la petite croix coché pour afficher la liste déroulante dans la cellule! Mais plus de liste déroulante dans la cellule!

Le problème de mon classeur c'est qu'il fait 11 mo !!!!!!
 
D

daniel

Guest
Ok je fais ça!! Mais je viens de m'apercevoir que c'est quand je sauvegarde que la liste s'en vas (La cellule est toujours configuré avec la validation mais la liste déroulante à disparue!)

Je l'envoi dans 1 mn
 
D

Daniel

Guest
Ca y est!

Mais vu ce qu'il reste je ne sais pas si c'est exploitable.

Les listes doivent se trouver dans la feuille MENU_IMPRESSION.

Une des liste nommée Liste_pays se base sur la feuille ENTETE selection A2:A4

La deuxième liste nommée LISTEREF se base sur la feuille Base de donnée en selection de la colonne B toute entière!

Donc on dirait que c'est quand je sauvegarde quue ça disparaît!

????? [file name=Etiqu.zip size=14415]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/Etiqu.zip[/file]
 

Pièces jointes

  • Etiqu.zip
    14.1 KB · Affichages: 25

bbmarcus

XLDnaute Occasionnel
Re,

alors s'il y avait un problème....je l'ai pas vu...en tout cas quand j'ai ouvert ton fichier, la liste était toujours là....

y a ptet comme tu le disais une interaction avec une macro...mais là, va savoir....si ton fichier est trop gros.....je peux pas t'aider malheureusement....

bbmarcus
 

Tibo

XLDnaute Barbatruc
Re Daniel,

A essayer, mais sans conviction :

ta place LISTEREF correspond à la colonne B entière.

Fais un essai avec LISTEREF défini comme suit : B2:B1000 (ou plus si nécessaire).

Sinon, ta macro utilise-t-elle LISTEREF ?

Désolé de ne pouvoir t'aider davantage.

Dis nous quoi si tu trouves la solution.

Bon courage

@+
 
D

DAniel

Guest
C'est après aplliquer cette macro et après la sauvegarde que ça ne mlarche plus :

Sub TEST_IMPR_ETIQ_NYLON()


' TEST de la cellule
If Range('D8') = '' Then
MsgBox ('VERIFIER LA SAISIE')
Exit Sub
End If



'Sélectionner et copier la ligne corespondant à la valeur de la cellule D8
Dim c As Range, blnOK As Boolean, strTest As String
strTest = Sheets('MENU_IMPRESSION').Range('D8')
blnOK = False
For Each c In Sheets('Base de donnée').Range('B2:B65536')
If c = strTest Then
blnOK = True
Exit For
End If
Next
If Not blnOK Then
Exit Sub
End If
Sheets('Base de donnée').Activate
Sheets('Base de donnée').Rows(c.Row).Select
Selection.Copy

Sheets('ATTENTE').Activate
Range('D11').Select
Application.ScreenUpdating = False

'Coller la ligne sur la feuille TAMPON
Sheets('TAMPON').Select
Range('A1').Select
ActiveSheet.Paste

'Mets la bonne police de nettoyage
Range('H1').Select
With Selection.Font
.Name = 'SL Wash'
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With


'Choix du format de l'étiquette entre nylon et autocolante
If Sheets('tampon').Range('A1') = 'SOIE' Then
Sheets('ETIQUETTE_NYLON').Select

Rows('2:24').Select
Selection.RowHeight = 10.5
Range('A1').Select
Columns('A:A').Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
'bug ici
Range('21:24,2:19').Select
Range('A19').Activate
Selection.Font.Bold = True
With Selection.Font
.Size = 7
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range('A20').Select
With Selection.Font
.Name = 'SL Wash'
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Font
.Name = 'SL Wash'
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Rows('20:20').RowHeight = 18
Range('A1').Select

Sheets('MENU_IMPRESSION').Select
Application.ScreenUpdating = True
Sheets('ETIQUETTE_NYLON').Copy


Range('A1:A24').Select
Selection.Copy
Range('A1:A24').Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range('A1').Select
Application.CutCopyMode = False
Exit Sub
End If

If Sheets('tampon').Range('A1') = 'PAP' Then
Sheets('ETIQUETTE_NYLON').Select

Rows('2:24').Select
Selection.RowHeight = 10.5
Range('A1').Select
Columns('A:A').Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.MergeCells = False
End With
'bug ici
Range('21:24,2:19').Select
Range('A19').Activate
Selection.Font.Bold = True
With Selection.Font
.Size = 7
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range('A20').Select
With Selection.Font
.Name = 'SL Wash'
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection.Font
.Name = 'SL Wash'
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Rows('20:20').RowHeight = 18
Range('A1').Select

Sheets('MENU_IMPRESSION').Select
Application.ScreenUpdating = True
Sheets('ETIQUETTE_NYLON').Copy
Range('A1:A24').Select
Selection.Copy
Range('A1:A24').Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range('A1').Select
Application.CutCopyMode = False
Exit Sub
End If


If Sheets('tampon').Range('A1') = 'CHAUSSURE' Then
Sheets('ETIQUETTE_AUTOCOLLANTE').Select


Range('A1:B9').Select
Selection.Interior.ColorIndex = xlNone
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection.Font
.Name = 'Arial'
.Size = 5
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
End With
Selection.Font.Bold = False
Selection.Font.Bold = True
Rows('1:9').Select
Selection.RowHeight = 9.75

Range('A1:B9').Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone

Sheets('MENU_IMPRESSION').Select
Application.ScreenUpdating = True
Sheets('ETIQUETTE_AUTOCOLLANTE').Copy
Range('A1:B9').Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range('A11').Select
Application.CutCopyMode = False
Exit Sub
End If

End Sub
 

Tibo

XLDnaute Barbatruc
Re re re,

Daniel,

Ta sauvegarde s'effectue-t-elle normalement (en cliquant sur la petite icône disquette) ou bien via une procédure macro ?

J'avoue ne pas saisir le lien entre l'enrregistrement et la disparition de la liste déroulante.

Il va falloir lancer un appel au peuple Xldien pour savoir si quelqu'un n'aurait pas déjà vécu un prlbème similaire.

Une idée qui me passe par la tête à l'instant :

Peux-tu envisager de faire un copier coller de ton classeur actuel sur un nouveau classeur (tout beau tout neuf) avec bien sût la recopie des macros ?

C'est juste une idée, je ne garantis rien.
 

Discussions similaires

Réponses
8
Affichages
490
Réponses
8
Affichages
302

Statistiques des forums

Discussions
312 748
Messages
2 091 615
Membres
105 008
dernier inscrit
fatimazahrabouaouda16@gma