Click here to Skip to main content
15,920,896 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: fra tab Pin
Ray Cassick8-Dec-07 7:01
Ray Cassick8-Dec-07 7:01 
GeneralFinding Available DB2 Servers Pin
Bob Bonser7-Dec-07 14:25
Bob Bonser7-Dec-07 14:25 
Generaladding multiple textboxes at runtime Pin
craigmg787-Dec-07 10:32
craigmg787-Dec-07 10:32 
GeneralRe: adding multiple textboxes at runtime Pin
Christian Graus7-Dec-07 10:51
protectorChristian Graus7-Dec-07 10:51 
GeneralRe: adding multiple textboxes at runtime Pin
craigmg787-Dec-07 10:57
craigmg787-Dec-07 10:57 
GeneralRe: adding multiple textboxes at runtime Pin
nlarson117-Dec-07 10:52
nlarson117-Dec-07 10:52 
QuestionWhat is the best way to write the same VBA code for multiple Excel workbooks? [modified] Pin
redjoy7-Dec-07 9:19
redjoy7-Dec-07 9:19 
GeneralRe: What is the best way to write the same VBA code for multiple Excel workbooks? Pin
Dave Kreskowiak8-Dec-07 17:04
mveDave Kreskowiak8-Dec-07 17:04 
VBA doesn't include any "include" support. It can't import code from some other source. The code is part of the workbook itself.

I think you're taking the wrong approach. If the code needs to work with data from other files, it's the data that needs to be brought to the code, not the code to the data. Your code should be in one spot, and have the ability to use data from any workbook that you chose.


redjoy wrote:
1. Is there a way that I can have one central location for the VBA code?


Not in an external file, no. But, you can have an single workbook that can import data from other workbooks. Or, you can write the code as an Add-In to Excel.


redjoy wrote:
2. Would an Excel add-in be appropriate?


That depends on what your code is doing and what your business process dictates.


redjoy wrote:
3. Should I program using VS (VSTO)?


Probably. Do the research on VSTO here[^].



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007



GeneralRe: What is the best way to write the same VBA code for multiple Excel workbooks? [modified] Pin
redjoy9-Dec-07 10:26
redjoy9-Dec-07 10:26 
GeneralRe: What is the best way to write the same VBA code for multiple Excel workbooks? Pin
Dave Kreskowiak10-Dec-07 2:02
mveDave Kreskowiak10-Dec-07 2:02 
GeneralRe: What is the best way to write the same VBA code for multiple Excel workbooks? Pin
hwahlberg10-Feb-08 10:24
hwahlberg10-Feb-08 10:24 
GeneralCreate log file Pin
nishkarsh_k7-Dec-07 6:38
nishkarsh_k7-Dec-07 6:38 
GeneralRe: Create log file Pin
nlarson117-Dec-07 8:33
nlarson117-Dec-07 8:33 
GeneralRe: Create log file Pin
Mark Churchill7-Dec-07 14:44
Mark Churchill7-Dec-07 14:44 
GeneralSigning a User Control Pin
Andy Dale7-Dec-07 3:39
Andy Dale7-Dec-07 3:39 
GeneralPassword Problem Pin
Dave McCool7-Dec-07 2:21
Dave McCool7-Dec-07 2:21 
GeneralRe: Password Problem Pin
Christian Graus7-Dec-07 10:53
protectorChristian Graus7-Dec-07 10:53 
GeneralRe: Password Problem Pin
Dave McCool8-Dec-07 1:37
Dave McCool8-Dec-07 1:37 
GeneralEnding a VB Program Pin
Dreamer20077-Dec-07 1:11
Dreamer20077-Dec-07 1:11 
GeneralRe: Ending a VB Program Pin
CPallini7-Dec-07 2:19
mveCPallini7-Dec-07 2:19 
QuestionURGENT: Export to excel and special characters Pin
buzzvishwanath6-Dec-07 22:47
buzzvishwanath6-Dec-07 22:47 
GeneralRe: URGENT: Export to excel and special characters Pin
coolestCoder7-Dec-07 4:40
coolestCoder7-Dec-07 4:40 
GeneralRe: URGENT: Export to excel and special characters Pin
leckey7-Dec-07 8:03
leckey7-Dec-07 8:03 
GeneralRe: URGENT: Export to excel and special characters Pin
Paul Conrad7-Dec-07 14:43
professionalPaul Conrad7-Dec-07 14:43 
GeneralUser defined DataTypes Pin
gilchinger6-Dec-07 21:21
gilchinger6-Dec-07 21:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.