D
Dave Peterson
If you still have that function (and the declaration line) in the worksheet
module, you should delete it. It's gonna do nothing but cause confusion later
on.
If your code in the worksheet (or any other module) needs that constant, then
change this:
Private Const ProgramVersionNumber As String = "1.1"
to
Public Const ProgramVersionNumber As String = "1.1"
By making the constant Public, then any procedure/function in any module will be
able to see it. (See Scope and visibility in VBA's help for more info.)
And you'll have to force that cell to reevaluate to update. Just changing the
code doesn't do this.
From xl2003's Help:
Change when and how formulas are calculated
By default, Microsoft Excel automatically recalculates formulas when the cells
that the formula depends on have changed.
Calculate a worksheet or workbook now
Press F9 Calculates formulas that have changed since the last calculation, and
formulas dependent on them, in all open workbooks. If a workbook is set for
automatic calculation, you do not need to press F9 for calculation.
Press SHIFT+F9 Calculates formulas that have changed since the last calculation,
and formulas dependent on them, in the active worksheet.
Press CTRL+ALT+F9 Calculates all formulas in all open workbooks, regardless
of whether they have changed since last time or not.
Press CTRL+SHIFT+ALT+F9 Rechecks dependent formulas, and then calculates all
formulas in all open workbooks, regardless of whether they have changed since
last time or not.
(The last one is not available in all versions of excel. I _think_ it was added
in xl2002, but I don't recall for sure.)
=====
One way to force all formulas to recalculate if you're having trouble.
Select all the cells
edit|Replace
what: = (equal sign)
with: =
replace all
Excel will see that you're "re-entering" each formula and will re-evaluate them.
module, you should delete it. It's gonna do nothing but cause confusion later
on.
If your code in the worksheet (or any other module) needs that constant, then
change this:
Private Const ProgramVersionNumber As String = "1.1"
to
Public Const ProgramVersionNumber As String = "1.1"
By making the constant Public, then any procedure/function in any module will be
able to see it. (See Scope and visibility in VBA's help for more info.)
And you'll have to force that cell to reevaluate to update. Just changing the
code doesn't do this.
From xl2003's Help:
Change when and how formulas are calculated
By default, Microsoft Excel automatically recalculates formulas when the cells
that the formula depends on have changed.
Calculate a worksheet or workbook now
Press F9 Calculates formulas that have changed since the last calculation, and
formulas dependent on them, in all open workbooks. If a workbook is set for
automatic calculation, you do not need to press F9 for calculation.
Press SHIFT+F9 Calculates formulas that have changed since the last calculation,
and formulas dependent on them, in the active worksheet.
Press CTRL+ALT+F9 Calculates all formulas in all open workbooks, regardless
of whether they have changed since last time or not.
Press CTRL+SHIFT+ALT+F9 Rechecks dependent formulas, and then calculates all
formulas in all open workbooks, regardless of whether they have changed since
last time or not.
(The last one is not available in all versions of excel. I _think_ it was added
in xl2002, but I don't recall for sure.)
=====
One way to force all formulas to recalculate if you're having trouble.
Select all the cells
edit|Replace
what: = (equal sign)
with: =
replace all
Excel will see that you're "re-entering" each formula and will re-evaluate them.