calling a subroutine outside a spreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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?
 
THEN HOW DO i MAKE THE EXTERNAL CALL,


to call cat in spreadsheet dog module 1:

call dog.vpb.module1.cat ??????????????
 
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
 

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