I've got an error
Object Variable or With Block Variable not Set
at Set lineProject = c.Row
when using the following code:
Private Sub CommandButton1_Click()
Dim pptFile As Object
Dim ppres As PowerPoint.Presentation
Path = "\\FSCFFACT\Activites\CFF DOMO GP ACT\Tableau de Bord\"
Set pptFile = CreateObject("Powerpoint.application")
If ComboBox1.Value <> "" Then
CODOMO.Hide
Libelle = ComboBox1.Value
lastline = Worksheets("Projets").Cells(Worksheets("Projets").Rows.Count, "B").End(xlUp).Row
Set c = Worksheets("Projets").Range("B10:B" & lastline).Find(Libelle)
Set lineProject = c.Row
pptFile.Presentations.Open (Path & "Modèle CODOMO.pptx")
Set pppres = pptFile.ActivePresentation
Else
...
End If
End Sub
I used he same lines in another macros, to find the ligne of a project using the Libelle.
Thanks for telling what's wrong.