Chirag R Raval
Member
Dear Sirs,
I create named range by VBA & in it have some formulas, I want to overwrite this range on itself with "paste as value" so there are no formulas reside in this range. only result
& formatting remains due to daily need to mail this file without any formula but formatting required.
but I can not overwrite this range with itself.
help will be appreciated .
Thanks
Regards,
Chirag Raval
I create named range by VBA & in it have some formulas, I want to overwrite this range on itself with "paste as value" so there are no formulas reside in this range. only result
& formatting remains due to daily need to mail this file without any formula but formatting required.
Code:
DEFINE 2ND RANGE HERE
Dim rng2 As Range
Dim my2ndrng As Range
Range("E1").Select
Selection.End(xlDown).Select
Selection.Offset(3, -1).Select
Selection.Resize(5, 3).Select
Set rng2 = Selection
ActiveWorkbook.Names.add name:="My2ndRng", RefersTo:=rng2
'HOW TO ACCESS OR SELECT THIS RANGE?
Application.Goto Reference:=ActiveWorkbook.Names("My2ndRng").name
but I can not overwrite this range with itself.
Code:
'
'BEFORE DELETE ALL NAMED RANGE ALL FORMULAS RANGE OVER WRITE WITH VALUES
with ActiveWorkbook.Range("my2ndrng").Copy
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End With
help will be appreciated .
Thanks
Regards,
Chirag Raval