sorry, a little detail yet, maybe offtopic.
how can i define object. Because i want to change all of data in new saved file only to value
i tried this, but it doesnt works
still problem with define object
thx
Sub SaveTODesktop()
Dim wb As Workbook
Dim wksActive As Worksheet
Dim strUserDesktop As String
Dim strNewName As String
'// Set a reference to the ActiveSheet, then create the new filename. //
Set wksActive = ThisWorkbook.ActiveSheet
strNewName = wksActive.Range("C9") & Chr(32) & Format(Date, "dd mmm yyyy") & ".xls"
'// Set a reference to a new one sheet workbook. //
Set wb = Workbooks.Add(xlWBATWorksheet)
'// Get the current user's path to Desktop //
strUserDesktop = CreateObject("Wscript.Shell").SpecialFolders("Desktop") _
& Application.PathSeparator
'// With the new wb, copy our previously active sheet to it, delete the //
'// one blank sheet that the new wb was created with, then SaveAs. //
With wb
wksActive.Copy .Sheets(1)
Application.DisplayAlerts = False
.Sheets(2).Delete
Application.DisplayAlerts = True
.SaveAs strUserDesktop & strNewName
Windows(strNewName).Activate
Sheets("navrh").Select
Range("A1:J1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range("A1:J96").Select
Selection.Copy
Application.CutCopyMode = False
Range("A1").Select
End With
End Sub