View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arif Khan Arif Khan is offline
external usenet poster
 
Posts: 1
Default Assign values to a cell in sheet A, from worksheet_change event of sheet B

Hi All,

I have this function in sheetA of my workbook, the event triggers but
i get an "Application-defined or object-defined error".

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Target.Row = 1 And Target.Column = 1 Then
ThisWorkbook.Worksheets("sheetB").Cells(1, 10).value = "100"
End If

End Sub


I tried searching on knowledge base and google it but didnt find any
specific explanation. I also tried selecting the worksheet, by using
this code but that didnt help either:

ThisWorkbook.Worksheets(Sheet).Select

Any tips/suggestions are highly appreciated.