Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I set up a global variable like:
Public lh as Integer ??? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put it in a standard module before any subs for udf's
-- Gary's Student "Ed" wrote: How can I set up a global variable like: Public lh as Integer ??? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Did that and solved the ptoblem. Thanks for replying. Ed English On Sun, 19 Nov 2006 08:51:02 -0800, Gary''s Student wrote: Put it in a standard module before any subs for udf's |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In general, global variables are not necessary, and if possible are best
avoided. Why do you think you need one? -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Ed" wrote in message ... How can I set up a global variable like: Public lh as Integer ??? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for reply. I'll be using the calculated variable to be used in
a procedure that would will be run 55 times. Rather than calculate it 55 times, I calculate it as once as a public. On Sun, 19 Nov 2006 17:14:47 -0000, "Bob Phillips" wrote: In general, global variables are not necessary, and if possible are best avoided. Why do you think you need one? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ed,
You do it exactly the way you have it below. Just be sure you have it in a regular code module (in the VBA editor, Insert menu, Module). Don't put the variable declaration in an object module (ThisWorkbook, the Sheets, a UserForm, or a Class module). -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email on the web site) "Ed" wrote in message ... How can I set up a global variable like: Public lh as Integer ??? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for a code module did the trick. thanks again.
Ed English On Sun, 19 Nov 2006 11:42:13 -0600, "Chip Pearson" wrote: Ed, You do it exactly the way you have it below. Just be sure you have it in a regular code module (in the VBA editor, Insert menu, Module). Don't put the variable declaration in an object module (ThisWorkbook, the Sheets, a UserForm, or a Class module). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
global variables | Excel Programming | |||
global variables | Excel Programming | |||
Global Variables | Excel Programming | |||
Global Variables | Excel Programming | |||
global variables | Excel Programming |