View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Randy[_2_] Randy[_2_] is offline
external usenet poster
 
Posts: 21
Default Set Global Variable Inside Object Module

I have a user form that I'd like to establish a global constant, but I
don't know how. I've tried:

Public Const strPW As String = "myPW"

but it errors out saying that this is "not allowed as Public members
of object modules".

Can I declare this publicly so that I don't have to do it in every
subroutine?

Thanks,
Randy