B
Brian C
Hi,
I'm running the following code to copy a range (single cell) from "Sheet3"
to a cell in the "Customer Data" sheet. The macro appears to select the
appropriate cell, copies the data, selects the appropriate destination sheet
and cell, then comes back with a Runtime error 1004 Paste Special method of
Range Class Failed error.
I unprotected the sheets, selected only a single cell range, and still get
the error.
Here's the code I'm using. The "Calculations" sheet will be used for other
copy -Past Special steps later in the macro, but can be ignored for now.
Thanks for your help,
Brian
Application.ScreenUpdating = False
destWB.Activate
Sheets("Sheet3").Visible = True
Sheets("Calculations").Visible = True
Sheets("Customer Data").Visible = True
Sheets("Calculations").Unprotect
Sheets("Customer Data").Unprotect
Sheets("Sheet3").Select
Range("A7").Select
Selection.Copy
Application.CutCopyMode = False
Sheets("Customer Data").Select
ActiveSheet.Range("B2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
***The error occurs while executing the Selection.PastSpecial command***
I'm running the following code to copy a range (single cell) from "Sheet3"
to a cell in the "Customer Data" sheet. The macro appears to select the
appropriate cell, copies the data, selects the appropriate destination sheet
and cell, then comes back with a Runtime error 1004 Paste Special method of
Range Class Failed error.
I unprotected the sheets, selected only a single cell range, and still get
the error.
Here's the code I'm using. The "Calculations" sheet will be used for other
copy -Past Special steps later in the macro, but can be ignored for now.
Thanks for your help,
Brian
Application.ScreenUpdating = False
destWB.Activate
Sheets("Sheet3").Visible = True
Sheets("Calculations").Visible = True
Sheets("Customer Data").Visible = True
Sheets("Calculations").Unprotect
Sheets("Customer Data").Unprotect
Sheets("Sheet3").Select
Range("A7").Select
Selection.Copy
Application.CutCopyMode = False
Sheets("Customer Data").Select
ActiveSheet.Range("B2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
***The error occurs while executing the Selection.PastSpecial command***