View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
HA14 HA14 is offline
external usenet poster
 
Posts: 9
Default Macro independent of newbook name

Thank you for keep helping me. In the meantime I found a great coding
doing another search. This one works perfect:

Application.ScreenUpdating = False

Dim NewFileName As String
Dim StartWkBk As Workbook

Set StartWkBk = ActiveWorkbook

NewFileName = InputBox("Enter file name to save overview of
Divisions per quarter (ROAD kvt, A&S kvt and SOL kvt) in separate
file: ")

With StartWkBk

.Sheets(Array("ROAD kvt", "A&S kvt", "SOL kvt")).Copy

ActiveSheet.Select
ActiveWorkbook.SaveAs Filename:=.Path & "\" & NewFileName & ".xls"
End With

Application.ScreenUpdating = True
End Sub

From
HA14