![]() |
copying results to other location
With ActiveSheet
With .Range("X6") .Locked = False .FormulaHidden = False End With .Range("V17").copy With .Range("X6") .PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False Selection.NumberFormat = "$#,##0.00" Range("W6:W17").Select Selection.ClearContents The above code copies from v17 to x6 as it should for some reason I cannot see why the following will not copy from x6 to v5 With ActiveSheet With .Range("V5") .Locked = False .FormulaHidden = False End With .Range("X6").copy With .Range("V5") .PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False .Locked = True .FormulaHidden = False End With Can any one help? Thanks in advance I am stumped |
copying results to other location
Hi Curt,
The principal problem is that you are missing some End If's. Try this slight adaptation: '=========== Sub Tester02() With ActiveSheet With .Range("X6") .Locked = False .FormulaHidden = False End With .Range("V17").Copy With .Range("X6") .PasteSpecial Paste:=xlValues, _ Operation:=xlNone, SkipBlanks:= _ False, _ Transpose:=False Application.CutCopyMode = False .NumberFormat = "$#,##0.00" Range("W6:W17").ClearContents End With End With With ActiveSheet With .Range("V5") .Locked = False .FormulaHidden = False End With .Range("X6").Copy With .Range("V5") .PasteSpecial Paste:=xlValues, _ Operation:=xlNone, _ SkipBlanks:= _ False, _ Transpose:=False Application.CutCopyMode = False .Locked = True .FormulaHidden = True End With End With End Sub '<<=========== --- Regards, Norman "Curt" wrote in message ... With ActiveSheet With .Range("X6") .Locked = False .FormulaHidden = False End With .Range("V17").copy With .Range("X6") .PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False Selection.NumberFormat = "$#,##0.00" Range("W6:W17").Select Selection.ClearContents The above code copies from v17 to x6 as it should for some reason I cannot see why the following will not copy from x6 to v5 With ActiveSheet With .Range("V5") .Locked = False .FormulaHidden = False End With .Range("X6").copy With .Range("V5") .PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False .Locked = True .FormulaHidden = False End With Can any one help? Thanks in advance I am stumped |
All times are GMT +1. The time now is 12:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com