I wrote VBA code that updates changes made in Excel to a database (SQL server).
How can I distribute this code to other users?
I stored the changed values in an array using the Worksheet_Change subroutine.
Sub Worksheet_Change(ByVal Target As Range)
'add value to array
End sub
I also have code to update the database:
Sub update_database()
'update database
End sub
I stored both subroutines in the sheet1 code.
How can I distribute this macro without the user copying and pasting my code?
I know that I can put my macro in quick link. But I don't know how to deal with the Worksheet_Change procedure which I think is bound to the sheet.