Pfad festlegen, brauch ma hilfe!
12.08.2008 10:10:18
sockel939
Private Sub CommandButton8_Click()
Sheets("Req.No.").Visible = 1
UserForm1.Show
Dim oldWB As Workbook, newWB As Workbook
Dim str As String
Set oldWB = ActiveWorkbook
With oldWB
Selection.Copy
str = oldWB.Sheets("Req.No.").Range("A1").Value
End With
Set newWB = Workbooks.Add
With newWB.ActiveSheet
.Paste
.SaveAs "order conf._" & str & ".xls"
.Columns.AutoFit
End With
Application.CutCopyMode = False
str = newWB.FullName
newWB.Close
Kill (str)
Sheets("Req.No.").Visible = 0
End Sub
Pfad für Ordner zum Speichern festlegen ?
Hab schon mit Dim As String probiert aber funzt nicht!