Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet change
This is fairly straightforward -
Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Column = 1 Then Sheets("Sheet1").Select Range("D1").Select End If End Sub but for the range select I get Runtime Error 1004 -- Select Method of Range Class Failed. I don't necessarily even want to go to Sheet1, but I get the same problem with eg: If Target.Column = 1 Then Range("Sheet1!D1").Value = Range("B2").Value I've seen replies to other questions on Worksheet_Change where switching to other sheets is OK, so I'm assuming it's something to do with my installation. Any suggestions gratefully received. TIA, Andy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet change
try
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub Application.Goto reference:=[Sheet1!d1] End Sub "Andy Brown" wrote in message ... This is fairly straightforward - Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Column = 1 Then Sheets("Sheet1").Select Range("D1").Select End If End Sub but for the range select I get Runtime Error 1004 -- Select Method of Range Class Failed. I don't necessarily even want to go to Sheet1, but I get the same problem with eg: If Target.Column = 1 Then Range("Sheet1!D1").Value = Range("B2").Value I've seen replies to other questions on Worksheet_Change where switching to other sheets is OK, so I'm assuming it's something to do with my installation. Any suggestions gratefully received. TIA, Andy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to change the pivot chart automaticaly as values in the worksheet change | Excel Worksheet Functions | |||
VBA Worksheet change name | Excel Discussion (Misc queries) | |||
change formula in a shared worksheet without losing change history | Excel Worksheet Functions | |||
Help Please, Worksheet Change | Excel Worksheet Functions | |||
Worksheet Change event | Excel Discussion (Misc queries) |