Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to code that when a cell is selected it copies the cell range
N3:Q242 from sheet x to the same cell range on the current sheet. With the code below, I receive a error: Run-time error 1004 Select method of Range class failed. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address = "$K$1" Then Sheets("ProgramSummaryTemplate").Select Range("N3:Q242").Select Selection.Copy Sheets("ProgramSummary").Select Range("N3:Q242").Select Selection.PasteSpecial End If Cancel = True End Sub Also, what is the syntax for the target to become the active worksheet instead of being hard coded. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. | Excel Worksheet Functions | |||
Copying the repeated data of the previous sheet to the next sheet | Excel Discussion (Misc queries) | |||
Dynamic column chart - copying from Sheet to Sheet. | Charts and Charting in Excel | |||
How to reference in sheet module value on another sheet? | Excel Programming | |||
2 questions, copying data from sheet to sheet and assigning macro | Excel Worksheet Functions |