Stored code

B

banavas

Dear Friends,

every time we add a button or any other interface component on an Exce
worksheet, where is the corresponding VBA code located and saved?

Thanks,
G
 
C

CoRrRan

Dear Friends,

every time we add a button or any other interface component on an
Excel worksheet, where is the corresponding VBA code located and
saved?

Thanks,
G.

Depends if you are using a "Forms"-button or a "Control Toolbox"-
button.

For a "Forms"-button, the code is in a seperate macro (press ALT+F11
and insert a module in the current Excel-project (for a new workbook
called Book1: VBAProject (Book1) ). If you create a button this way,
Excel asks you directly for a macro to assign to the button.

For a "Control Toolbox"-button, the code is found by right clicking
on the button (in Design Mode!!!) and pressing "View code".

HTH,
CoRrRan
 
N

N10

HI

Right click the button in after selecting design mode.

Then select view code from the list. This will open the VB editor and
provide the oppurtunity to either view existsing code for that button or
create a new sub routine for the button button.

Buttons are a mans best freind :)

N10
 
Top