Archive of Mr Excel Message Board


Back to Excel VBA archive index
Back to archive home

"Select method of Range class failed" error

Posted by DebC on June 14, 2000 4:09 PM
Here's the code. Any guesses as to why I get a run time error during execution?
thanks deb


Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Interior.ColorIndex = vbCyan Then
MsgBox "Enter Seat Number in Box"
Else
Application.ScreenUpdating = False
Valx = Target.Value
Target.Value = "X"
Worksheets("Sheet2").Activate
ERROR Range("A1:A6").Select
Range("a1").Activate
If ActiveCell.Value = "" Then
ActiveCell.Value = Sheets("Sheet1").Range("G30").Value
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = Valx
End If
End If
End Sub


Check out our Excel VBA Resources

Never mind - fixed it thanks

Posted by debc on June 15, 0100 7:42 PM


This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.