Bonjour,
j'ai créé une macro qui me permet de modifier la police d'une cellule et de l'afficher dans une TextBox.
Le code marche parfaitement pour modifier la cellule mais quoi que je fasse ma Textbox est souligné.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 Private Sub CommandButton1_Click() Sheets("Feuil1").Activate Range("A1").Select Application.Dialogs(xlDialogFontProperties).Show With Me.TextBox1 .Value = Sheets("Feuil1").Range("A1") .ForeColor = Sheets("Feuil1").Range("A1").Font.Color .FontName = Sheets("Feuil1").Range("A1").Font.Name .FontSize = Sheets("Feuil1").Range("A1").Font.Size .FontBold = Sheets("Feuil1").Range("A1").Font.Bold .FontUnderline = Sheets("Feuil1").Range("A1").Font.Underline .Font.Strikethrough = Sheets("Feuil1").Range("A1").Font.Strikethrough End With End Sub
Je suppose que la ligne qui pose problème estMais je trouve pas pourquoi.
Code : Sélectionner tout - Visualiser dans une fenêtre à part .FontUnderline = Sheets("Feuil1").Range("A1").Font.Underline
Si quelqu'un peut m'aider...
Merci d'avance






Répondre avec citation



Partager