Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple VBA Global Delorations?
Hi All
I am trying to write a series of functions in VBA for Excel 97. I want to declare a series of constants (calculated by trigonometry within module) at the start of my module for use throughout all the functions. Can I do this and how? ( I tried to declare them as const but I got an error on the trig functions.) Thanks Chris |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple VBA Global Delorations?
A constant is not calculated. You can use a public variable.
Public MyTrigVal1 as Double Sub InitMyTrigVal1() MyTrigVal1 = SomeTrigFunction End Sub The trick is when do you want InitMyTrigVal1 to be run. Call it from the workbook_Open event? See Chip Pearson's page on Events http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy "Chris" wrote in message ... Hi All I am trying to write a series of functions in VBA for Excel 97. I want to declare a series of constants (calculated by trigonometry within module) at the start of my module for use throughout all the functions. Can I do this and how? ( I tried to declare them as const but I got an error on the trig functions.) Thanks Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
global changes | Excel Worksheet Functions | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple problem, simple formula, no FUNCTION ! | Excel Worksheet Functions | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Make it more simple or intuitive to do simple things | Charts and Charting in Excel |