View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
James James is offline
external usenet poster
 
Posts: 542
Default Reference a variable declared in VBA

I have a question and dont have the slightest idea on how to go about it.
I have a cell G8 that will get text input to it. If G8 has text in it, then
cell B8 will input the persons name retrieved from VB with a public variable
name of "name."
I was thinking the best way to do this is with a formula in cell B8 that is
something like:

=IF(Range("G7").Value<"",Module1.Name,"")

Module1.Name is the Module and Public Variable in that module that i want to
reference.
any help would be great, not too familliar with formulas. thanks again!