Option Explicit
Dim Mess As Integer, r As String
Dim xnomfic As String, ficd As String, xcell As String, xnomsh As Variant
Dim i As Long
Dim xshcherchee As Worksheet
Dim classeur As Workbook
Dim wb As Workbook
Dim ws As Worksheet
Sub OuvrirMuscu()
'CREER UN DOSSIER
r = Feuil23.[C2]
If Dir("C:\Users\Uscarcassonne\dropbox\joueurs\" & r, vbDirectory) = "" Then _
MkDir "C:\Users\Uscarcassonne\dropbox\joueurs\" & r
' CREER UN CLASSEUR
Application.ScreenUpdating = False
xnomfic = Range("C2"): ficd = xnomfic & " Musculation.xlsx"
' Contrôle de l'existence du fichier ou classeur
If FichierExiste("C:\Users\Uscarcassonne\dropbox\joueurs\" & r & "\" & ficd) = "Vrai" Then ' MODIFIER LE CHEMIN DU REPERTOIRE - SI NECESSAIRE
' ------------------------------------------------------------------------------------------------------------------
' Le classeur existe - On recherche si la feuille existe
Workbooks.Open ("C:\Users\Uscarcassonne\dropbox\joueurs\" & r & "\" & ficd): Application.AskToUpdateLinks = True: Workbooks(ficd).Activate ' MODIFIER LE CHEMIN DU REPERTOIRE - SI NECESSAIRE
ActiveWindow.Zoom = 100
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollRow = 1
End If
End Sub