Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forcing Dim Requirement
How do I set the option in Excel VBA that I MUST Dim variable befor using them? I would prefer it this way to the default where Excel jus 'creates' variables that are spelt differently etc. Thanks, Phi -- Phil_ ----------------------------------------------------------------------- Phil_V's Profile: http://www.excelforum.com/member.php...fo&userid=3185 View this thread: http://www.excelforum.com/showthread.php?threadid=52371 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forcing Dim Requirement
type "option explicit" prior to sub Phil_V Wrote: How do I set the option in Excel VBA that I MUST Dim variable befor using them? I would prefer it this way to the default where Excel jus 'creates' variables that are spelt differently etc. Thanks, Phi -- kwiklearne ----------------------------------------------------------------------- kwiklearner's Profile: http://www.excelforum.com/member.php...fo&userid=3190 View this thread: http://www.excelforum.com/showthread.php?threadid=52371 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forcing Dim Requirement
Check out this link...
http://www.cpearson.com/excel/DeclaringVariables.htm -- HTH... Jim Thomlinson "Phil_V" wrote: How do I set the option in Excel VBA that I MUST Dim variable before using them? I would prefer it this way to the default where Excel just 'creates' variables that are spelt differently etc. Thanks, Phil -- Phil_V ------------------------------------------------------------------------ Phil_V's Profile: http://www.excelforum.com/member.php...o&userid=31857 View this thread: http://www.excelforum.com/showthread...hreadid=523711 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Forcing Dim Requirement
Put Option Explicit as the very first line in your code
module(s), before and outside of any procedure declaration. You can have this automatically placed in new modules. In VBA go to the Tools menu, choose Options, then the Editor tab. There, place a check next to "Require Variable Declaration". -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Phil_V" wrote in message ... How do I set the option in Excel VBA that I MUST Dim variable before using them? I would prefer it this way to the default where Excel just 'creates' variables that are spelt differently etc. Thanks, Phil -- Phil_V ------------------------------------------------------------------------ Phil_V's Profile: http://www.excelforum.com/member.php...o&userid=31857 View this thread: http://www.excelforum.com/showthread...hreadid=523711 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bedroom Requirement | Excel Worksheet Functions | |||
Critical requirement. | Excel Worksheet Functions | |||
Sum with special requirement | Excel Worksheet Functions | |||
formula requirement | New Users to Excel | |||
if until requirement met | Excel Programming |