View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Private Sub - Called from Userform

Keep the subs public, and add the statement

Option Private Module

to the start of Module1. This will make all procedures in Module1 public to
that project, but not to others, and they will not show in the macro list.

--
__________________________________
HTH

Bob

"pallaver" wrote in message
...
I am trying to make all my subs private to minimize confusion for
others using my excel spreadsheet.

All of my subs/macro are on Module1, including a public sub called
ItemDataInput.

On my Userform code, if the user presses a certain button it calls sub
ItemDataInput.

The problem though is if I make Sub ItemDataInput "Private", it
doesn't work.

Any way to work around this? Or do I have to just have a visible/
public sub? (This isn't the end of the world, could just have it be
public, but figured to ask :))

Thankx, NP