• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Do action if sheet is selected

Hi,

Can anyone help to my VBA issue.
I want cell A3 get value from cell A1 automatically whenever I select sheet1 without clicking run button.

Thanks,
Chanthan
 

Attachments

  • VBA-If with active worksheet.xlsm
    14 KB · Views: 3
Right-click Sheet1 and select View Code then paste the following lines
Code:
Private Sub Worksheet_Activate()
    Range("A3").Value = Range("A1").Value
End Sub
Now select Sheet2 and back to select Sheet1 and the event will be triggered ..
 
Back
Top