Hi,
I have 2 workbooks and I want to add a sheet in the 2nd workbook and name the new sheet from a cell in the 1st workbook
Code after recording:
Sub veckonummer()
Range("R33").Select
Application.CutCopyMode = True
Selection.Copy
Windows("Kopia 2004.xls").Activate
ActiveSheet.Select
Application.CutCopyMode = True
ActiveSheet.Name = "0401"
Range("B1").Select
ActiveWorkbook.Save
End Sub
This row is hardcoded I want it to be as referens so if I change the "0401" it will name it according to the change.
ActiveSheet.Name = "0401"
/Thomas
I have 2 workbooks and I want to add a sheet in the 2nd workbook and name the new sheet from a cell in the 1st workbook
Code after recording:
Sub veckonummer()
Range("R33").Select
Application.CutCopyMode = True
Selection.Copy
Windows("Kopia 2004.xls").Activate
ActiveSheet.Select
Application.CutCopyMode = True
ActiveSheet.Name = "0401"
Range("B1").Select
ActiveWorkbook.Save
End Sub
This row is hardcoded I want it to be as referens so if I change the "0401" it will name it according to the change.
ActiveSheet.Name = "0401"
/Thomas