Fonction EST(OUVERT) ..VBA
Bonsoir à tous
Je sollicite une bonne volonté pour réparer ce code VBA que j’essaie en vain de faire fonctionner.
Je suis très loin d’être une pro du développement.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| Private Sub CommandButton1_Click()
estouvert = False
chemin = ActiveWorkbook.Path
For Each fich In Workbooks
If fich.Name = "toto.xlsm" Then estouvert = True
'Sheets("Feuil1").Range("A1").Activate
Next
If estouvert = False Then
Workbooks.Open Filename:=chemin & "\" & "toto.xlsm"
'Sheets("Feuil1").Range("A1").Activate
End If
End Sub |
Merci beaucoup de votre aide