Bonjour,
Novice en BVA, c'est certainement le bazar dans mon classeur...
Depuis aujourd'hui, mes boutons de formulaire sont invisibles. Lorsque je passe la souris sur leur emplacement je peux néanmoins cliquer dessus et démarrer ma macro.
Seulement, je ne comprends pas pourquoi...
Est-ce que dans mes codes je dois écrire qqc pour faire apparaître les boutons ? Si oui, où donc ?
Merci de votre aide !
Sub EnregistrerPlanning()
' Macro7 Macro
Dim col As Byte
Feuil13.Unprotect 'feuille Issin
With Feuil13.ListObjects("TabPLANNING16") 'feuille Issin
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 11
.DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil10.ListObjects("Tableau212") 'feuille Mantes
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 8
If Feuil12.Cells(ActiveCell.Row, 2) = "MANTESLAJOLIE" Then .DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil11.ListObjects("Tableau213") 'feuille GARGES
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 8
If Feuil12.Cells(ActiveCell.Row, 2) = "GARGES" Then .DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil2.ListObjects("Tableau2") 'feuille NANTERRE
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 8
If Feuil12.Cells(ActiveCell.Row, 2) = "NANTERRE" Then .DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil4.ListObjects("Tableau25") 'feuille VERSAILLES
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 8
If Feuil12.Cells(ActiveCell.Row, 2) = "VERSAILLES" Then .DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil5.ListObjects("Tableau258") 'feuille CERGY
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 8
If Feuil12.Cells(ActiveCell.Row, 2) = "CERGY" Then .DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil6.ListObjects("Tableau29") 'feuille ANTONY
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 8
If Feuil12.Cells(ActiveCell.Row, 2) = "ANTONY" Then .DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil8.ListObjects("Tableau210") 'feuille PARIS
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 8
If Feuil12.Cells(ActiveCell.Row, 2) = "PARIS" Then .DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil9.ListObjects("Tableau211") 'feuille CRETEIL
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
'Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
For col = 1 To 8
If Feuil12.Cells(ActiveCell.Row, 2) = "CRETEIL" Then .DataBodyRange.Item(lig, col) = Feuil12.Cells(ActiveCell.Row, col)
Next col
End With
With Feuil12.ListObjects("TabPLANNING")
Rows(ActiveCell.Row).Delete
End With
Sheets("ISSIN").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("PLANNING").Select
End Sub
autre code même problème
Sub EnregistrerInterprete()
Dim lig As Integer, Numinterp As Integer
Dim col As Byte
With Feuil15.ListObjects("TabINTERPRETES") 'feuille repertoire interpretes
Numinterp = .ListRows.Count + 1 'numero interprete
If .ListRows.Count = 0 Then
.ListRows.Add: lig = 1
Else: .ListRows.Add: lig = .ListRows.Count 'insérer à la dernière ligne
'Else: .ListRows.Add Position:=1: lig = 1 'insérer a la 1igne 1
End If
With .DataBodyRange
For col = 1 To 8
.Item(lig, col) = Feuil14.Cells(10, col).Value 'tel
Next col
.Item(lig, 9) = UCase(Feuil14.Cells(10, 2).Value) & " " & Application.Proper(Feuil14.Cells(10, 3).Value) & " " & Numinterp 'ref interprete
End With
Call Effaceform2 'effacer formulaire
End With
End Sub
et le dernier...
Sub TestEnregistrerLangue()
Dim col As Integer, lig As Integer
With Feuil1 'feuille LANGUESINTERPRETES
.Unprotect
'recherche position d'export
On Error Resume Next 'en cas d'erreur ligne suivante
col = .Range("A1:DC1").Find(Range("B18")).Column 'range("B18") dans feuille active ˆ savoir celle du formulaire
On Error GoTo 0 'on remet le paramtre par d_faut pour les erreurss
If col = 0 Then
MsgBox "La langue " & Range("B18") & " est introuvable.", vbInformation, "Langue introuvable"
Exit Sub
End If
If .Cells(2, col) = "" Then
lig = 2
Else
lig = .Cells(1, col).End(xlDown).Row + 1
End If
'export
.Cells(lig, col) = Range("A18")
End With
With Feuil14 'FORMULAIRE
Range("B18").ClearContents
End With
End Sub