How to trigger a Worksheet_Change event when the change is done in a macro?

I have a macro for sheet1 that sorts range “A:A” when there is a change.  In a macro for sheet2 it copies a range and adds it to sheet1 after the last entry.  Everything works, but the range will not sort until I click a cell in the sheet.  How do I trigger an on change event in a macro?
kbay808Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin LissOlder than dirtCommented:
You'll need to post a sample workbook that shows the problem because if a macro changes a sheet the Change event will fire.
0
[ fanpages ]IT Services ConsultantCommented:
If you create a Public Sub within the code module for [Sheet1] that calls the Worksheet_Change(...) event (passing any cell reference), you can then call the Public Sub directly from your "macro" within [Sheet2] after copying the range of data.

For example,

Within the code module for [Sheet1]:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

  MsgBox "Sort column [A] in [Sheet1] here.", vbInformation Or vbOKOnly, ThisWorkbook.Name
  
End Sub
Public Sub WorksheetChange()

  Call Worksheet_Change([A1])
  
End Sub

Open in new window


...and within the code module for [Sheet2]:

Option Explicit
Private Sub Q_28748959()

' Range copied to [Sheet1] here
' Then call the WorksheetChange subroutine directly...

  Call Sheet1.WorksheetChange
  
End Sub

Open in new window

1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kbay808Author Commented:
Awesome!!!  Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.