Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copying chart to location within same workbook | Charts and Charting in Excel | |||
copying the contents of a named range from one location to another | Excel Discussion (Misc queries) | |||
Copying formatting from a cell whose location I have calculated. | New Users to Excel | |||
copying row information in a table to another location w/criteria | Excel Programming | |||
Copying TEXT from Textbox to other location | Excel Programming |