Bonjour à tous,
J'ai un petit souci lors de la COPIE de deux Feuilles du classeur B vers le classeur A
Ce très cher Excel me renomme la feuille en feuille1. Pas le nom de l'onglet mais le vrai nom
![]()
Voici le code ... Qu'est ce qui cloche ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 Option Explicit Public Sub transdebut() Dim xlApp As Excel.Application Dim wkA As Workbook, wkB As Workbook On Error GoTo Erreur Excel.Application.DisplayAlerts = False Set wkA = ThisWorkbook With wkA shthistorik.Delete shtDaten.Delete End With wkA.Save Workbooks.Open ("M:\Palettenfahnen\Erzeugte_pzt\DB_Pzt.xlsm") Set wkB = ActiveWorkbook wkB.Sheets("daten").Copy Before:=wkA.Sheets("Empfang") wkB.Sheets("Historik").Copy Before:=wkA.Sheets("Empfang") MsgBox "Daten sind aktualisiert", vbDefaultButton1 wkB.Close False Excel.Application.DisplayAlerts = True With wkA Sheets("Historik").Visible = xlSheetHidden Sheets("daten").Visible = xlSheetHidden End With UsfEintrag.Show Exit Sub Erreur: Exit Sub End Sub
Partager