calling a subroutine outside a spreadsheet

D

dino

I have just inheireted a spreadsheet that locates many routines in a separate xls. It then executes them with application.Run (ActiveWorkbookName & "!subroutinename") which seems rather unusual to me.

I believe this has been done so that no code is left in the calling program where the user can not see/modify the code - is this module itself.

How else would you execute code without exposing it to the user and making it available to be monkied with?
 
T

Tom Ogilvy

Password protect the code/project in the VBE under Tools.

--
Regards,
Tom Ogilvy

dino said:
I have just inheireted a spreadsheet that locates many routines in a
separate xls. It then executes them with application.Run
(ActiveWorkbookName & "!subroutinename") which seems rather unusual to me.
I believe this has been done so that no code is left in the calling
program where the user can not see/modify the code - is this module itself.
How else would you execute code without exposing it to the user and making
it available to be monkied with?
 
D

dino

THEN HOW DO i MAKE THE EXTERNAL CALL,


to call cat in spreadsheet dog module 1:

call dog.vpb.module1.cat ??????????????
 
T

Tom Ogilvy

You don't make an external call. You put the code in the worksheet where
you use it.

Otherwise, use the method you already have Application.Run
 
D

dino

Tom Ogilvy said:
You don't make an external call. You put the code in the worksheet where
you use it.

Otherwise, use the method you already have Application.Run
 
Top