Ok, this is really strange...Originally Posted by xld
This is the code I have now:
[vba]Sub test()
Dim wbNew As Workbook
Dim wks As Worksheet
Set wbNew = Workbooks.Add(xlWBATWorksheet)
ThisWorkbook.Worksheets.Copy After:=wbNew.Worksheets(1)
Application.DisplayAlerts = False
wbNew.Worksheets(1).Delete
Application.DisplayAlerts = True
For Each wks In wbNew.Worksheets
wks.UsedRange.Value = wks.UsedRange.Value
Next wks
Application.Dialogs(xlDialogSaveAs).Show
End Sub[/vba]
And it works... strange... - could it have been something about indentation of code?? I am used to closing functions with "}" :-)