Enregistrement excel via macro vba
Résolu/Fermé
A voir également:
- Enregistrement excel via macro vba
- Telecharger macro convertir chiffre en lettre excel - Télécharger - Tableur
- Liste déroulante excel - Guide
- Si et excel - Guide
- Word et excel gratuit - Guide
- Déplacer une colonne excel - Guide
4 réponses
gbinforme
Messages postés
14946
Date d'inscription
lundi 18 octobre 2004
Statut
Contributeur
Dernière intervention
24 juin 2020
4 716
6 juil. 2009 à 23:54
6 juil. 2009 à 23:54
bonjour
Comme ceci, si j'ai compris ta logique :
Le code n'est pas testé car je n'ai pas ces codes lecteurs.
Comme ceci, si j'ai compris ta logique :
Private Sub CommandButton1_Click() if ThisWorkbook.fullname = "M:\Planning.xls" then ThisWorkbook.SaveCopyAs "U:\Planning.xls" else ThisWorkbook.SaveCopyAs "M:\Planning.xls" end if ThisWorkbook.Save End Sub
Le code n'est pas testé car je n'ai pas ces codes lecteurs.
eriiic
Messages postés
24603
Date d'inscription
mardi 11 septembre 2007
Statut
Contributeur
Dernière intervention
15 décembre 2024
7 256
7 juil. 2009 à 09:49
7 juil. 2009 à 09:49
Bonjour,
ou bien
Private Sub CommandButton1_Click()
ThisWorkbook.Save
on error resume next
ThisWorkbook.SaveCopyAs "M:\Planning.xls"
ThisWorkbook.SaveCopyAs "U:\Planning.xls"
on error goto 0
End Sub
non testé également
eric
ou bien
Private Sub CommandButton1_Click()
ThisWorkbook.Save
on error resume next
ThisWorkbook.SaveCopyAs "M:\Planning.xls"
ThisWorkbook.SaveCopyAs "U:\Planning.xls"
on error goto 0
End Sub
non testé également
eric