AW: Sheets(Sheets.Count).Move Before:=Sheets(1)
07.10.2005 15:09:48
Marco
entschuldigen sie, dass ich nicht gleich bescheid wusste wohin damit.
nein es funktioniert nicht. hier mal mein code :
Sub Start()
arrFolder(1) = "\_test\"
arrFolder(3) = "\_test\"
boolConvert = True
intAnzahl = 1
For i = 5 To 500
If Sheets("test").Cells(i, 17) <> "" Then
intAnzahl = intAnzahl + 1
End If
Next i
intAnzahl = intAnzahl - 1
FrmStatus.PB1.Max = intAnzahl
If MsgBox("Soll der Importvorgang gestartet werden?", vbYesNo, "Starten...") = vbNo Then
Exit Sub
End If
Application.ScreenUpdating = False
Application.DisplayAlerts = False
intCounter = 5
While ThisWorkbook.Sheets("test").Cells(intCounter, 17) <> ""
intAktuellesWorkbook = intAktuellesWorkbook + 1
strFileName = ThisWorkbook.Path & arrFolder(1) & ThisWorkbook.Sheets("test").Cells(intCounter, 17)
Workbooks.Open strFileName, , False
strNameFile = ActiveWorkbook.Name
'**** Code für SheetTransport
Workbooks(strNameFile).Activate
intAnzahl = ActiveWorkbook.Sheets.Count
For i = 1 To 1
Workbooks(strNameFile).Sheets(i).Copy Before:=ThisWorkbook.Sheets(1)
Next i
'**** Code Ende
Workbooks(strNameFile).Close
FrmStatus.PB1.Value = intAktuellesWorkbook
intCounter = intCounter + 1
Wend
MsgBox "Alle Sheets erfolgreich kopiert!", vbInformation, "Fertig..."
boolConvert = False
End Sub