Store VBA-Code centrally

  • Thread starter Thread starter Martin Schneider
  • Start date Start date
M

Martin Schneider

Hi!

I have certain instances of Excel-Sheets with VBA code. I update the
code frequently and have to go through all the Excel sheets and copy and
paste the updates.

Is there a way to store the code centrally and have the sheets update
automatically?

Best regards,
Martin
 
If all the sheets are in one workbook and the code is same for each sheet,
place the code in Thisworkbook module.

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)

your code here

End Sub

If sheets in multiple workbooks see Chip Pearson's site.

http://www.cpearson.com/excel/vbe.aspx


Gord Dibben MS Excel MVP
 

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

Back
Top