Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default How do you change code in the VBE without opening the target workb

I am wondering if there is a way of changing the code in the VBE for other
Excel files while the target Excel file is already closed. Is this possible?
How would I code this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How do you change code in the VBE without opening the target workb

Hi Brett,

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

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


---
Regards,
Norman


"Brett Smith" wrote in message
...
I am wondering if there is a way of changing the code in the VBE for other
Excel files while the target Excel file is already closed. Is this
possible?
How would I code this?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default How do you change code in the VBE without opening the target w

Know about that already, that didn't really help much. Can you expand?
Thanks!

"Norman Jones" wrote:

Hi Brett,

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

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


---
Regards,
Norman


"Brett Smith" wrote in message
...
I am wondering if there is a way of changing the code in the VBE for other
Excel files while the target Excel file is already closed. Is this
possible?
How would I code this?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How do you change code in the VBE without opening the target w

Hi Brett,

Chip Pearson shows how to write or delete code in an external project.
However, I think that the other workbook would have to be open - I missed
the 'closed' stipulation.


---
Regards,
Norman


"Brett Smith" wrote in message
...
Know about that already, that didn't really help much. Can you expand?
Thanks!

"Norman Jones" wrote:

Hi Brett,

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

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


---
Regards,
Norman


"Brett Smith" wrote in message
...
I am wondering if there is a way of changing the code in the VBE for
other
Excel files while the target Excel file is already closed. Is this
possible?
How would I code this?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default How do you change code in the VBE without opening the target workb

You should consider writing code so that it doesn't need replacement at the
source code level. An add-in would be one way to go. From an earlier post
of mine...

I've been meaning to write a tutorial on the subject. Just haven't
gotten around to it. In the meantime, check msdn.microsoft.com.
Specifically,
Microsoft Office XP Developer
Building Application-Specific Add-ins
http://msdn.microsoft.com/library/de...l=/library/en-
us/modcore/html/deovrbuildingapplicationspecificaddins.asp
and
Microsoft Office XP Developer
Add-ins, Templates, Wizards, and Libraries
http://msdn.microsoft.com/library/de...l=/library/en-
us/modcore/html/deovraddinstemplateswizardslibraries.asp.

Concentrate on the 'Application specific add-ins' and not the 'COM Add-
Ins.'

Basically, in XL, after saving the workbook with the code, save it as
an add-in (File | Save As...) Close the file, then load the add-in
through Tools |Add-Ins...

A key point to remember is that code in the add-in that refers to
ThisWorkbook refers to the add-in workbook, while a reference to
ActiveWorkbook refers to the open workbook, whatever that might be.

***** Please make very very sure you always save the file as a normal
workbook before saving it as an add-in. Otherwise, you may be unable to
access the worksheets / source in the add-in file! *****

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I am wondering if there is a way of changing the code in the VBE for other
Excel files while the target Excel file is already closed. Is this possible?
How would I code this?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting cells that are controlled using Target code NDBC Excel Discussion (Misc queries) 2 July 24th 09 12:26 AM
macro code to change file-opening password arunjoshi[_18_] Excel Programming 1 June 16th 05 08:49 AM
Getting source lists w/o opening target file Arifi Koseoglu Excel Programming 5 May 25th 04 05:55 PM
Executing code with opening target workbook Todd Huttenstine[_3_] Excel Programming 1 December 26th 03 02:00 AM
Executing code with opening target workbook Todd Huttenstine[_3_] Excel Programming 0 December 25th 03 08:39 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"