Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding to remove and import Module
Hi!
I would like to remove a VB module and import an other one each time I open my excel file. Thus I need the code to put in my Sub Auto_Open() to remove and import a module. I just hope these codes exist! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding to remove and import Module
Try something like
Sub Auto_Open() On Error Resume Next With ThisWorkbook.VBProject.VBComponents .Remove .Item("modToReplace") .Import Filename:="C:\Test\modToReplace.bas" End With End Sub See www.cpearson.com/Excel/VBE.aspx for much more information about working with the objects in the VBA Editor. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) wrote in message ups.com... Hi! I would like to remove a VB module and import an other one each time I open my excel file. Thus I need the code to put in my Sub Auto_Open() to remove and import a module. I just hope these codes exist! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Coding to remove and import Module
Excellent! Works great! Thanks!
Now I have text in a Notepad document and I would like it to be copied in a cell once the module is copied. Which code can I use to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Import underscore in coding every after 2 digits | Excel Worksheet Functions | |||
Import Module | Excel Programming | |||
Remove and Import Module | Excel Programming | |||
VBA-How to insert vba code file in a project using coding rather than manual import | Excel Programming | |||
Import module with vba | Excel Programming |