How can I update VBA code in a module that is running my VBA code?

G

Gummy

Hello,

I have VBA code that checks against a SQL Server database on an intranet
that returns the most current version number of the code I've written
(whatever number and date I put into the table).

What I want to do is if the version on the SQL Server database is newer then
the version that the user has, I want it to automatically download a newer
version of the VBA code I've written. Is there a way to do that?
Specifically, how can I update VBA code in a module that is running my VBA
code? I think I am OK with all the connection strings and database stuff.

I am dealing with users who want just to see a screen that says, "Updating
your workbook..." and not have to do anything at all. I would have been
easier just to point them to a intranet-website and say, "go download this
file."

Thank you for the help.

-Gumbatman
 
N

NickHK

Start here for working with the VBE:
http://www.cpearson.com/excel/vbe.htm

Put the update code in a separate module, or add-in, so you are not trying
to edit the module that is currently running the update code.
Presumably the Update code does not itself need to be updated.....

NickHK
 

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