In Excel vba how do you Launch code a standalone Module from a Form or other Module ?

I can create stand alone modules in Excel vba by clicking File New Module or 
some such.

How can I run the code in those stand alone modules from another module or a 
Form that has its own code?

Thanks for any help.


topmailbox (52)
4/10/2005 9:09:16 PM
excel 39879 articles. 2 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 16

If you're talking about "New Project" from the VBA File menu, 
this create a new VBA project that is used to create COM Add-Ins, 
a discussion of which is beyond the scope of a newsgroup reply. 
In general, you want to use the Insert menu to create a new 
module in an existing workbook.

In VBA, there is no such thing as a "stand-alone" module; all 
modules are contained within a workbook.

Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC

"tmb" <> wrote in message 
>I can create stand alone modules in Excel vba by clicking File 
>New Module or some such.
> How can I run the code in those stand alone modules from 
> another module or a Form that has its own code?
> Thanks for any help.
> tmb

chip1 (1821)
4/10/2005 10:40:47 PM

Similar Artilces:

Novice trying to create zip code look-up
I know that it is possible to create a situation where a zip code is typed into one column, and the city identified with that zip code pops up in another column, but cannot figure out where to start with this. Can anyone give some guidance? -- Karen Karen, Use a 2 column combo box. (ex. cboZip) First Column for Zipcode and second column for City. Set the combo's ControlSource (bind it) to your ZipCode field. Since this combo control will capture the ZipCode, it is not necessary to also "capture" the City value in another control... just "...

Excel bug: conditional formatting
When using conditional formatting with more than more formula, the formatting ceases to go through all conditions once one condition becomes true. This isn't the same behavior as when cell values are used. This to me is a bug, but if this is intended, it should at least be an option to continue through all conditions. The behaviour is the same when cell values are used. For example: Condition 1: Cell Value Is greater than 10 Format: Bold Condition 2: Cell Value Is greater than 20 Format: Red Condition 3: Cell Value Is greater than 30 Format: Italic A cell that contains a...

Excel Web Queries
I know how to setup Excel 2002 web queries from sites that are publicl available. The question is: *can you setup web queries linked to a we site that is private (i.e. you need a password to access it) such a your private portfolio in Morningstar or similar sites? -- rpensott ----------------------------------------------------------------------- rpensotti's Profile: View this thread: ...

Excel VB
I have produced a table, Data, which automatically generates a char using Macro's and VB. However, I am trying to add more rows to increas the size of the chart but unfortunatly, I cannot get the chart range to increase automatically. Something that I would like to do. I have attached the file to hopefully help. By clicking onto the Macro Update, I would like to update the chart even if and when new rows ar added to the table in Data. I think that the problem lies in Name Ranges and I have added '*' t where in the macro I think that the problem is. Is there anyone who can hel...

Finding duplicate records in Excel
I know how to find duplicate records in Access but, for a broad-range project that I shall be working on Excel, is the way I want to go. I shall be mergind data from various sources and I will want to find and eliminate duplicate entries. I did not find any answers under Google groups. Can someone point me to reference material(s) regarding this topic? KG And from Google search...... Gord Dibben Excel MVP On Wed, 22 Dec 2004 11:15:01 -0800, "KG" <...

Excel template has no pagesetup when opening from VB
Could anybody help me how to get back the pagesetup of a template? I have a VB application to create a workbook from a template. When I launch the from VB, it works fine to get back the pagesetup from the template with: oWorkBook=oExcelApp.WorkBooks.Open (Filename:="myWorkbook.xlt", Edittable:=False) oWorkBook.Sheets(1).PageSetup.LeftHeader containes the defined header from the template But when I launch the compiled EXE oWorkBook.Sheets(1).PageSetup.LeftHeader containes an empty string. Any idea? Thanks for any help! ...

Display form from an VB application in Excel
Dear All, I have the following problem with a macro. I hope somebody may help me. Problem: I want to display a VBA form created in an VB application on top of an Excel worksheet to enter some information. But when I show the form after opening the Excel workbook, the macro automatically switches back to the application showing this form (and not on top of the Excel workbook). Code: .... 'Open Excel workbook Set xlS = clsApp.GetApplication("excel.Application") Set xlsWB = xlS.Workbooks.Open(filename) xlS.Visible = True 'Show form on top of that Excel workbook frm.Show vbMod...

Excel hangs when manipulating large spreadsheets
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I am running an updated version of Excel 2008 (version 12.2.3) on an Intel Core 2 Duo iMac (4GB memory, 320 GB hard drive w/165 GB available). When I am working with a moderate sized workbook (17 MB, 21,000 rows x 26 columns) of data Excel will hang when I attempt to copy and paste sections of the spreadsheet or attempt to copy a function across all the rows of the spreadsheet. The files were originally xlsx files. I saved them to xlsb files but am still having the same problem. Activity monitor shows that E...

"Excel needs to close"
Frequently, when turning my computer on, I will get the error message, "Microsoft Excel for Windows has encountered a problem and needs to close". It has not been left on nor was it used in the previous session of computer use. I am using XP Home. How can I fix it or should I even be concerned? Check to see what is starting up when you boot your computer up. See if anything is in teh startup folder, check using msconfig as well "Ed Mullikin" <> wrote in message news:3om_h.111445$s8.90157@newsfe21.lga... > Frequently, when turning my comp...

Form #1 that filters form #2
I have a form #1 customers and form #2 orders. I put a button on form #1 to open form #2 filtered but customerID. However, when I go to data enter the second...tenth customers the order form does not save the information into table or form. What am I doing wrong and How can I correct this problem? On Fri, 13 Nov 2009 08:09:01 -0800, Jennifer <> wrote: >I have a form #1 customers and form #2 orders. I put a button on form #1 to >open form #2 filtered but customerID. However, when I go to data enter the >second...tenth customers th...

Apply formatting through code
Hi and TIA. I have a worksheet like so. I'm trying to conditionally format the cells in Column C. If this is possible where do a place a call to the procedure? I want the procedure to run for each individual row except I can't simply copy the formula down the sheet because I have headers and totals rows. I'm new to excel. I'm an Access geek. Any advice or if you can point me in the right direction is appreciated. Thanks for your time! Header: USS Vinson A B C 1 3 3 1 2 2 3 4 3 1 2 2 Tot 6 8 7 ...

Records on Form don't get saved
I'm new to access and was wondering if anyone knew how I could input data on a form...close the form (clicking saving) and later going back and viewing the data? I did those steps but when I go back the data isn't goes back to showing 1 record and it being a blank form Access, by default, save data entered when a form is close or when you navigate to another records. A couple possibilities are possible with your situation. 1- when you open the form, can you use navigation buttons at the bottom of the form to goto other records? If so, can you find the previously ma...

Making the "add item" option available to VBA
I'd like to add VBA code to the Project PO Window that automatically checks the "add item" option from the toolbar when the window is opened. Anyone know how to get that menu option available to VBA? thanks! Martha That really isn't possible (directly) with VBA because VBA cannot see menus. About the only thing you can do is record a macro that checks this option. Then run the macro from VBA. that isn't directly available from vba either but there is a TK that tells you how to work around it. "Martha" <> wrote in messa...

Excel - Array Formulas - Freeze
Hi all I have a big problem. It takes about 30 minutes to save my excel fil because I have many array formula: about 32 000! So do you have a ti to accelerate the computing process? Is a VBA function would do i faster? Here is an example of what I use: Col A contain unique numbers Sheet 1: Col A Col B Col C Row1 001 123 9i9 Row2 005 456 8u8 Row3 003 406 8ur etc... to +8000 In sheet 2, I have to check if the data exist in sheet 1. Col D contai Yes (data is in the sheet1) or No... Examples: Col D check if the data in Col B is the same in sheet 1 Col...

html source code into Excel
Can anyone tell me how to (in VBA) get the source code for a web page into a string so that I can parse it? Note: I can't use a Query Table for this part as the data I need is imbedded into an href. Any help would be greatly appreciated. Thanks, Paul ...

How to replicate Excels' numeric "Accounting" format in Access Rep
How to replicate Excels' numeric "Accounting" format in Access Report client want's Access report to output values in format identical to Excel's numeric "Accounting" format if I try to difine it as such it converts the 'Format' definition to >> \acc"ou"n"ti"n\g and strangely dosen't give the desired result I'm using Office 2003 on Windows 2000 -- Jim Have you tried Currency with 2 decimal places? -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www.access.hookom...

how to save file with preview in excel
How do you save a file with preview in excel On the File menu, choose Properties, then the Summary tab. There, check the "Save preview picture" checkbox. "Rebee" <> wrote in message > How do you save a file with preview in excel ...

GP10 Smartlist problem output to Excel 2010
When we see the listing in the Smartlist, we click the button with Excel logo, to export the listing to Excel, but GP prompt with error message :Unable to start Microsoft Excel This is the newly purchased workstation. This is the first computer that is come with Microsoft Office 2010 version, the rest are still using Office 2007. And this new computer has never been successfully launched Excel from the Smartlist. We are wondering if the Office 2010 STARTER edition can work work with Dynamics GP 10 with FP1 SP4. Please advice ...

To unlock the access of my Excel sheet
Hello, I have forgotten the password who locks the access to my Excel sheet. Could somebody explain to me the way to unlock this Excel sheet? Thank you in advance, JeanMickey You can download the free Utiliities program from This includes a password breaker by the wizard Bob Bovey. HTH remember, if this helps click Yes Peter "JeanMickey" wrote: > Hello, > > I have forgotten the password who locks the access to my Excel sheet. > Could somebody explain to me the way to unlock this Excel sh...

Stamp, Watermark In Excel??
I have a purchase order document that I created in Excel. I would like to have some kind of electronic "stamp" or "watermark" that I can import or put on the document to show "PAID" or something to that effect. Does anyone have suggestions or know of a way that I can do this. I know that in Microsoft Word it allows you to put a watermark in the background. This is essentially what I am trying to do but I am working with Excel. Thanks for any help. Hi Monica, See xlDynamic FAQ page on watermarks at:

Basic Excel Help....!
Hi, I am a newbie to this board and to excel.. I have a list of numbers: 07973190447 07788520694 07803297928 07753115869 07736777401 What I want to do is delete the 0 at the start and replace it with 44 is there a quick way of doing this... Thanks, Simo ----------------------------------------------- ~~ Message posted from ~~View and post usenet messages directly from ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements Copy this formula down the next column and format as number. =A1+44000...

removing duplicate records in excel, how to do it?
How to remove duplicart entries within excel? Data>advanced filter, unique records only Regards, Peo Sjoblom "Don" wrote: > How to remove duplicart entries within excel? Hi see: -- Regards Frank Kabel Frankfurt, Germany Don wrote: > How to remove duplicart entries within excel? Have you notice that the first entry is duplicated in both cases: when header line is included or exclude "Peo Sjoblom" wrote: > Data>advanced filter, unique records only > > Regards, > > Peo S...

Excel Chart Help
Hello Everyone, I've been tasked with updating a 14 year old excel macro running on a 15 year old mac :(. I'm running into problems with the replicating the charts. Heres an example: (Sorry about the quality, camera phone...) Each group represents a different area of our state and each group has its own average line. I'm having 2 problems. Grouping the data from each area together. When I try to set each area up as a series it groups the first entry of each area together then the second entry for each area and so on. ...

Error Starting Excel
Hi I have an annoying problem when I open a worksheet. Hopefully there is a simple solution. I open "Budget.xls" --> excel loads but the budget.xls does not open. There is just the excel program running with no file opened. This happens whenever I try to open an excel file. Does anyone know how to fix this problem? Just a guess -- but try to unprotect the workbook, and also try Windows/Arrange. Bob Umlas, Excel MVP "Jeff" <> wrote in message > Hi > > ...

excel diagram
My version of Microsoft Office XP 2002 will not put arrows on a diagram for Excel. I have tryed to use another computer to input a diagram, but it changes it back to no arrows when I do anything. Is there an update that may I do not have? The update website says that I have all the updates. Any suggestions. Thanks My guess is the arrow is behind the chart. Click on chart (I assume this is your 'diagram') Use Drawing too to add arrow Now the chart and the arrow are 'grouped' beast wishes -- Bernard V Li...