Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to make subs/procs can only be called from within the workbook they belong to?

Hi,

Can someone tell me if (and how) I can prevent subs and procedures in a
workbook to be called from outside that workbook?

Any help will be greatly appreciated.
--
HTH

Arnoud


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default how to make subs/procs can only be called from within the workbook they belong to?

Arnoud,

Put "Option Private Module" at the top of the code module containing the
code.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"Arnoud Oortwijk" wrote in message
...
Hi,

Can someone tell me if (and how) I can prevent subs and procedures in a
workbook to be called from outside that workbook?

Any help will be greatly appreciated.
--
HTH

Arnoud




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default how to make subs/procs can only be called from within the workbook they belong to?

Class modules whose Instancing property is set to Private (the default) are
also invisible outside the workbook.

--
Bob Kilmer


"Arnoud Oortwijk" wrote in message
...
Hi,

Can someone tell me if (and how) I can prevent subs and procedures in a
workbook to be called from outside that workbook?

Any help will be greatly appreciated.
--
HTH

Arnoud




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SIZE Window, Tile, Worksheet, Workbook, Whatever it's called. JamesInNeedFootballInDeed New Users to Excel 4 October 31st 07 11:16 PM
how to I make member list that indicates when subs due Lozza Excel Worksheet Functions 2 January 17th 07 02:52 PM
When I open a workbook, another one called Book1 is also opened. W Ian@MarlandLtd Excel Discussion (Misc queries) 2 November 9th 05 09:36 AM
why is an Excel file called a workbook? Monique Excel Discussion (Misc queries) 3 October 14th 05 05:52 PM
Do the Addins belong to a workbook, or are they global to all workbooks loaded? Chip Pearson Excel Programming 3 August 6th 03 11:01 PM


All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"