Macro that runs when worksheet is automatically updated

L

Lambi000

I have a workbook that has a worksheet (Sheet1) for user entry. This updates
another worksheet (Sheet2) automatically with information specific for that
part number as defined in Sheet1.

I have a macro that puts a picture in Sheet2 and it works beautifully except
I need it to run when the information from Sheet1 changes Sheet2
automatically. How can I make that macro run whenever I switch to Sheet2.

(Sheet1 has data entered....Sheet2 automatically has field changes...needs
macro to run whenever switching to Sheet2 to view the data).

Thanx
 
G

Gary''s Student

Lets assume that you macro (called lambi) is in a public module.

In the worksheet code area for Sheet2 insert:

Private Sub Worksheet_Activate()
Call lambi
End Sub
 
L

Lambi000

Worked like a charm. Thanks for the code.

Gary''s Student said:
Lets assume that you macro (called lambi) is in a public module.

In the worksheet code area for Sheet2 insert:

Private Sub Worksheet_Activate()
Call lambi
End Sub
 

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