Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unreachable public variables
I define a group of public variables. I have a macro that initializes them.
They work fine through all my functions and subs. I have not found a way to get my formulas in cells to see them. For example =A1*pi won't work. My workaround has been to stick the value of pi in a cell and use a named range. What's the real solution to using public vaiables in cell formulas?? -- Gary's Student |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unreachable public variables
Variables are VBA variables and visible only within VBA code. To make
them accessible from XL, create public functions that are then used as user-defined-functions.' Do keep in mind that XL itself supports many functions natively, including PI() Const cPi=3.1415927 public function Pi():pi=cpi:end function Then, in some cell, use =Pi() -- Regards, Tushar Mehta www.tushar-mehta.com Multi-disciplinary business expertise + Technology skills = Optimal solution to your business problem Recipient Microsoft MVP award 2000-2005 In article , says... I define a group of public variables. I have a macro that initializes them. They work fine through all my functions and subs. I have not found a way to get my formulas in cells to see them. For example =A1*pi won't work. My workaround has been to stick the value of pi in a cell and use a named range. What's the real solution to using public vaiables in cell formulas?? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unreachable public variables
Notwithstanding that Excel has a PI() function, if you want worksheet
constants like that, create a workbook name with that name and the required value. -- HTH Bob Phillips "Gary's Student" wrote in message ... I define a group of public variables. I have a macro that initializes them. They work fine through all my functions and subs. I have not found a way to get my formulas in cells to see them. For example =A1*pi won't work. My workaround has been to stick the value of pi in a cell and use a named range. What's the real solution to using public vaiables in cell formulas?? -- Gary's Student |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
public variables | Excel Discussion (Misc queries) | |||
Public variables | Excel Discussion (Misc queries) | |||
Public Variables | Excel Discussion (Misc queries) | |||
Public Variables | Excel Programming | |||
Public Variables | Excel Programming |