Access a Variable from the Worksheet

G

Gary''s Student

Is there anyway to link the value of a public variable in a module to a Name
in the worksheet?

For example:

Public mesge As String
Sub anything()
mesge = "Hello World"
End Sub

and then somehow define a Name of the worksheet so that:
=mesge
would display:
Hello World
 
G

Gary''s Student

PERFECT!
--
Gary''s Student - gsnu200800


Bob Phillips said:
Activeworkbook.Names.Add Name:="msge", RefersTo:="Hello World"

--
__________________________________
HTH

Bob
 

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