Hello members!
When i look inside the name manager the formula is wrapped into apostrof's.
Because of that my vba code below doesn't work. Without apostrof's the vba code won't even run.
Can someone show me a solution for this problem?
Kind regards
When i look inside the name manager the formula is wrapped into apostrof's.
Because of that my vba code below doesn't work. Without apostrof's the vba code won't even run.
Can someone show me a solution for this problem?
VBA Code:
Sub Productieprint()
ActiveWorkbook.Names("DynPrint").RefersToR1C1 = "=OFFSET('" & ActiveSheet.Name & "'!R2C6,0,0,COUNTA('" & ActiveSheet.Name & "'!C6),4)"
Application.CutCopyMode = False
Sheets(ActiveSheet.Name).PageSetup.Orientation = xlPortrait
ActiveWorkbook.Worksheets(ActiveSheet.Name).Names("Print_Area").RefersToR1C1 = "=DynPrint"
End Sub
Kind regards