I
Illuminati
I have a such macro :
Private Sub Macro1(arkusz As Worksheet)
arkusz.Range(arkusz.PageSetup.PrintArea).Copy
Sheets("Sheet1").Select
Range("A" & Trim(Str(zLastRow))).Select
Arkusz50.Paste
Application.CutCopyMode = False
ActiveWorkbook.Names.Add Name:="A1", RefersToR1C1:=Selection
zLastRow = zLastRow +
arkusz.Range(arkusz.PageSetup.PrintArea).Rows.Count
Range("A" & Trim(Str(zLastRow))).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
End Sub
However the above macro doesnt work (this part:
ActiveWorkbook.Names.Add Name:="A1", RefersToR1C1:=Selection).
I want to name a range by the value located in the cell A1 from the
copied sheet.
Does anybody knows how to do it?
Private Sub Macro1(arkusz As Worksheet)
arkusz.Range(arkusz.PageSetup.PrintArea).Copy
Sheets("Sheet1").Select
Range("A" & Trim(Str(zLastRow))).Select
Arkusz50.Paste
Application.CutCopyMode = False
ActiveWorkbook.Names.Add Name:="A1", RefersToR1C1:=Selection
zLastRow = zLastRow +
arkusz.Range(arkusz.PageSetup.PrintArea).Rows.Count
Range("A" & Trim(Str(zLastRow))).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
End Sub
However the above macro doesnt work (this part:
ActiveWorkbook.Names.Add Name:="A1", RefersToR1C1:=Selection).
I want to name a range by the value located in the cell A1 from the
copied sheet.
Does anybody knows how to do it?