Assign values to a cell in sheet A, from worksheet_change event of sheet B

A

Arif Khan

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top