developvbdebut
Messages postés476Date d'inscriptionsamedi 14 août 2004StatutMembreDernière intervention 2 juin 20121 13 nov. 2005 à 10:34
Bonjour tout le monde
Je m'exuse si je suis vague dans les questions que je pose.
Ce que je souhaite c'est que les bodures soivent placé sur la ligne de H à F à chaque foi qu'une données est entré.
Voici tout le code:
Sub enregistreleve()
Dim lLigneFin As Integer
Dim rCell As Range
lLigneFin = Worksheets("Tableau").Cells.SpecialCells(xlLastCell).Row
Set rCell = Worksheets("Tableau").Cells(lLigneFin + 1, 2)
With rCell
.Select
If UserForm1.OptionButton1 = True Then
ElseIf UserForm1.OptionButton2 = True Then
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
ElseIf UserForm1.OptionButton3 = True Then
End If
.Value = UserForm1.txtSaisie
If UserForm1.Chkgras Then
.Font.Bold = True
Else
.Font.Bold = False
End If
If UserForm1.Chkgitalic Then
.Font.Italic = True
Else
.Font.Italic = False
End If
UserForm1.ComboBox1.AddItem "arial"
UserForm1.ComboBox1.AddItem "Courrier New"
UserForm1.ComboBox1.AddItem "Time New Roman"
Select Case .Font.Name
Case "arial"
UserForm1.ComboBox1.ListIndex = 0
Case "Courrier New"
UserForm1.ComboBox1.ListIndex = 1
Case "Time New Roman"
UserForm1.ComboBox1.ListIndex = 2
3) il me manque 2 code un pour aligner le texte à droite, le deuxieme pour aligner le texte à gauche.
4) j'ai fai un code pour changer la hauteur de ligne, mais le probleme c'est qu'il marque erreur de compilation "utilisation incorect de la propriété" en selectionnant SpinButton1
Voici le code de spinButton1
Private Sub SpinButton1_Change()
Label8.Caption = _
" Hauteur de ligne : " & SpinButton1.Value
End Sub