Microsoft 365 Rendre Bouton Inactif sous conditions

eric72

XLDnaute Accro
Bonjour à tous,

Je vais commencer par vous remercier de votre implication pour venir en aide à des noeunoeu comme moi!!!
Dans le fichier ci-joint, j'ai un enregistrement automatique lorsque je saisis un budget, cet enregistrement un nom de fichier avec l'année concernée, j'aimerais qu'après l'enregistrement le fichier "Trame Planning Commande" qui va devenir "Chiffres + année" rende Inactif le bouton "Budget", est-ce possible?
J'ai cherché mais je n'ai pas trouvé...
Merci beaucoup.
Cordialement.
Eric
 

Pièces jointes

  • test excel download.xlsm
    863.2 KB · Affichages: 7
Solution
Bonjour Eric,
Une possibilité facilement modifiable en regardant le nom du fichier courant :
VB:
Sub OpenUsfBudget()
    If ThisWorkbook.Name <> "Trame Planning Commande" Then
        MsgBox "Fichier déjà renommé"
        Exit Sub
    End If
    UsfBudget.Show
End Sub

sylvanu

XLDnaute Barbatruc
Supporter XLD
Bonjour Eric,
Une possibilité facilement modifiable en regardant le nom du fichier courant :
VB:
Sub OpenUsfBudget()
    If ThisWorkbook.Name <> "Trame Planning Commande" Then
        MsgBox "Fichier déjà renommé"
        Exit Sub
    End If
    UsfBudget.Show
End Sub
 

Pièces jointes

  • test excel download.xlsm
    884.8 KB · Affichages: 5

Statistiques des forums

Discussions
312 223
Messages
2 086 397
Membres
103 200
dernier inscrit
pascalgip