ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replace module with code (https://www.excelbanter.com/excel-programming/370289-replace-module-code.html)

Michael Wise[_38_]

Replace module with code
 

I want to replace a current module in a workbook with a updated module
of th same name. More or less like a patch. Can this be done using
code. I've looked through the threads and do not see anything that
directly relates to using code to replace the module.
M


--
Michael Wise
------------------------------------------------------------------------
Michael Wise's Profile: http://www.excelforum.com/member.php...fo&userid=6998
View this thread: http://www.excelforum.com/showthread...hreadid=571347


Norman Jones

Replace module with code
 
Hi Michael,

See Chip Pearson's programming to the VBE page at:

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


---
Regards,
Norman



"Michael Wise"
wrote in message
news:Michael.Wise.2cj543_1155558608.2199@excelforu m-nospam.com...

I want to replace a current module in a workbook with a updated module
of th same name. More or less like a patch. Can this be done using
code. I've looked through the threads and do not see anything that
directly relates to using code to replace the module.
M


--
Michael Wise
------------------------------------------------------------------------
Michael Wise's Profile:
http://www.excelforum.com/member.php...fo&userid=6998
View this thread: http://www.excelforum.com/showthread...hreadid=571347




Bob Phillips

Replace module with code
 
'----------------------------------------------------------------
Function UpdateModule()
'----------------------------------------------------------------
Dim vbMod As Object

Set vbMod = ThisWorkbook.VBProject.VBComponents("mTest")
ThisWorkbook.VBProject.VBComponents.Remove vbMod

ThisWorkbook.VBProject.VBComponents.Import _
Filename:="C:\mTest.bas"

End Function


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Michael Wise"
wrote in message
news:Michael.Wise.2cj543_1155558608.2199@excelforu m-nospam.com...

I want to replace a current module in a workbook with a updated module
of th same name. More or less like a patch. Can this be done using
code. I've looked through the threads and do not see anything that
directly relates to using code to replace the module.
M


--
Michael Wise
------------------------------------------------------------------------
Michael Wise's Profile:

http://www.excelforum.com/member.php...fo&userid=6998
View this thread: http://www.excelforum.com/showthread...hreadid=571347




Bob Phillips

Replace module with code
 
Also, include this at the start of the code module

Const vbext_pk_Proc = 0


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Michael Wise"
wrote in message
news:Michael.Wise.2cj543_1155558608.2199@excelforu m-nospam.com...

I want to replace a current module in a workbook with a updated module
of th same name. More or less like a patch. Can this be done using
code. I've looked through the threads and do not see anything that
directly relates to using code to replace the module.
M


--
Michael Wise
------------------------------------------------------------------------
Michael Wise's Profile:

http://www.excelforum.com/member.php...fo&userid=6998
View this thread: http://www.excelforum.com/showthread...hreadid=571347




Gary Keramidas

Replace module with code
 
that site is helpful. i used it to create a single checkbox on a form, i use for
a menu, to toggle auto open on and of.



--


Gary


"Norman Jones" wrote in message
...
Hi Michael,

See Chip Pearson's programming to the VBE page at:

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


---
Regards,
Norman



"Michael Wise"
wrote in message
news:Michael.Wise.2cj543_1155558608.2199@excelforu m-nospam.com...

I want to replace a current module in a workbook with a updated module
of th same name. More or less like a patch. Can this be done using
code. I've looked through the threads and do not see anything that
directly relates to using code to replace the module.
M


--
Michael Wise
------------------------------------------------------------------------
Michael Wise's Profile:
http://www.excelforum.com/member.php...fo&userid=6998
View this thread: http://www.excelforum.com/showthread...hreadid=571347






KR

Replace module with code
 
Bob- I realize this is an old thread, but I'm catching up- I've had trouble
using code to update modules (an ongoing task) and I haven't seen this line
of code before. What does it do?
Thanks!
Keith

"Bob Phillips" wrote in message
...
Also, include this at the start of the code module

Const vbext_pk_Proc = 0


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Michael Wise"
wrote in message
news:Michael.Wise.2cj543_1155558608.2199@excelforu m-nospam.com...

I want to replace a current module in a workbook with a updated module
of th same name. More or less like a patch. Can this be done using
code. I've looked through the threads and do not see anything that
directly relates to using code to replace the module.
M


--
Michael Wise
------------------------------------------------------------------------
Michael Wise's Profile:

http://www.excelforum.com/member.php...fo&userid=6998
View this thread:

http://www.excelforum.com/showthread...hreadid=571347







All times are GMT +1. The time now is 11:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com