Inserting a sub

  • Thread starter Thread starter Guido Massaro
  • Start date Start date
G

Guido Massaro

Could anyone tell me how i can insert a sub in a excell
sheet.
I have found a sub, i copy the text and now i like to put
it into excell so i can use it everytime.
 
Not sure what you mean. A subroutine must go into a code modul
contained in a workbook. With the workbook open use keys Alt +F11 t
open the VB Editor. Use menu Insert/Module and copy/paste the code t
there. If you want the code page for a specific worksheet, right clic
the sheet tab and select "View Code"
 
Guido

Depends upon what type of Sub you have copied.

Event code will go into either the worksheet or Workbook module.

Regular Subs could be placed into a standard module.

To make the regular Sub available for all open workbooks, it would be placed
into your Personal.xls or an add-in(*.XLA).

See David McRitchie's site for info on getting started with macros.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

OR post the code. Someone could tell you where to place it.

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top