PC Review


Reply
Thread Tools Rate Thread

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

 
 
Gummy
Guest
Posts: n/a
 
      12th Jun 2007
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


 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      12th Jun 2007
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

"Gummy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Gummy
Guest
Posts: n/a
 
      12th Jun 2007
Great! Thank you for the link.

"NickHK" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> "Gummy" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>
>>

>
>



 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      12th Jun 2007
You may find this article interesting:

http://www.jkp-ads.com/articles/updateanaddin.asp

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Gummy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Great! Thank you for the link.
>
> "NickHK" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>
>> "Gummy" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> 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
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
running code only in selected module lawebster Microsoft Excel Programming 1 19th Jun 2007 11:49 AM
Running Access 2003 VB Module code example =?Utf-8?B?RnJhbmtTcG9rYW5l?= Microsoft Access VBA Modules 7 30th Aug 2006 08:09 PM
Running code in a forms module Demon Microsoft Access Form Coding 3 23rd Oct 2005 08:18 AM
Running Standard Module Code from Dataform =?Utf-8?B?SmltIE1heQ==?= Microsoft Excel Programming 1 29th Sep 2005 04:08 PM
how to reference name of module running code dchendrickson Microsoft Access VBA Modules 1 26th Aug 2003 07:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:14 AM.