Groupe résidentiel et macro excel

pacou620 - 3 août 2012 à 10:58
rackamlerouge Messages postés 13 Date d'inscription jeudi 18 septembre 2003 Statut Membre Dernière intervention 7 octobre 2013 - 7 oct. 2013 à 15:30
Bonjour à tout ceux qui bossent
Petit problème, j'ai changé tout mes PC: deux PC de bureau et 1 portable sous windows 7 je les ai mis en réseau (groupe résidentiel)
Sur le principal PC j'ai des dossiers excel comprenant des macros
le PC secondaire est relié par Livebox: RJ 45
Le portable en wifi
je vous met les macros ci dessous et les problèmes ensuite

1ere macro
Sub imprimefacture()
Sheets("facture").Range("A1:f56").Copy Destination:=Sheets("recafacture").Cells(Sheets("recafacture").Range("A65536").End(xlUp).Row + 1, 1)

If [K1] <> "" Then
Range("K1:T1").Copy
Sheets("client").Select
Range("A" & Range("A65536").End(xlUp).Row + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Sheets("facture").Select
End If
If [V1] <> "" Then
Range("V1:AD" & WorksheetFunction.Count(Range("V1:V22"))).Copy
Sheets("journalvente").Select
Range("A" & Range("A65536").End(xlUp).Row + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Sheets("facture").Select
End If
ActiveSheet.Range("A1:F56").PrintOut Copies:=1
Range("E4").Value = Range("E4").Value + 1
Range("B15:B18").ClearContents
Range("A21:C42").ClearContents
Range("F21:F42").ClearContents
Range("E18").ClearContents
Range("C19").ClearContents
End Sub

2eme macro
Sub Macro1()
Range("V1:AD22").Select
Selection.Copy
Sheets("journalvente").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("K1:T2").Select
Selection.Copy
Sheets("client").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Sheets("facture").Select
End Sub

3eme macro
Sub registrfacture()
Sheets("facture").Range("A1:f56").Copy Destination:=Sheets("recafacture").Cells(Sheets("recafacture").Range("A65536").End(xlUp).Row + 1, 1)

If [K1] <> "" Then
Range("K1:T1").Copy
Sheets("client").Select
Range("A" & Range("A65536").End(xlUp).Row + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Sheets("facture").Select
End If
If [V1] <> "" Then
Range("V1:AD" & WorksheetFunction.Count(Range("V1:V22"))).Copy
Sheets("journalvente").Select
Range("A" & Range("A65536").End(xlUp).Row + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Sheets("facture").Select
End If
Range("E4").Value = Range("E4").Value + 1
Range("B15:B18").ClearContents
Range("A21:C42").ClearContents
Range("F21:F42").ClearContents
Range("E18").ClearContents
Range("C19").ClearContents
End Sub

Quand je travaille sur le PC priincipal, aucun problème
Quand je travaille sur le PC portable, aucun problème
Quand je travaille sur le PC secondaire,gros problème: j'arrive à ecrire sur excel, mais a partir du moment ou j'utilise les macros, je n'arrive plus à enregistrer mon fichier excel, cela crée un dossier temp, cela coupe la connection internet de ce PC et je n'arrive plus a fermer ce PC
AU secours, j'ai essayé plein de truc, mais suis pas spécialiste
Merci merci de votre aide.
au passage mes macros ne sont peut être pas top

1 réponse

rackamlerouge Messages postés 13 Date d'inscription jeudi 18 septembre 2003 Statut Membre Dernière intervention 7 octobre 2013 1
7 oct. 2013 à 15:30
Ce n'est pas un problème de macro. Mais un problème de fichiers partagés (à mon avis). On ne peut pas enregistrer sur un fichier déjà ouvert ou en lecture seule.
0
Rejoignez-nous