Const declarations and accessibility

X

XP

Using Windows XP and Office 2007;

Is there a way to obtain the contents of a string constant from another
module where the other module in which the const lives is marked "Option
Private Module" and the const is declared as: Private Const myConst As String
= "MyString"?

If possible, could someone please post a generic example on how to do it?

If NOT marked private, is a module level Const automatically global, if not,
what is it?

Thanks for the clarifications!
 
P

Peter T

Change 'Private Const' to 'Public Const'. That should still be visible
throughout the project even with Option Private Module

Regards,
Peter T
 

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

Top