Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically switch off "Variable declaration reqiured" in VBE?
Hi All, Is there a way to programmatically switch off the 'Variable Declaration Required' option in the VBE (VBE - Tools - Options - Editor - Require Variable Declaration)? I am using Excel 2000 - fully patched. Thanks in advance, Alan. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically switch off "Variable declaration reqiured" in VBE
The effect of that setting is to wtite this line in any new modul or class:
Options Explicit If you delete this line, you will not have to declare your variables. "Alan" wrote: Hi All, Is there a way to programmatically switch off the 'Variable Declaration Required' option in the VBE (VBE - Tools - Options - Editor - Require Variable Declaration)? I am using Excel 2000 - fully patched. Thanks in advance, Alan. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically switch off "Variable declaration reqiured" in VBE?
But why would you? There are no benefits that I know of, and plenty of
disadvantages. -- HTH RP (remove nothere from the email address if mailing direct) "Alan" wrote in message ... Hi All, Is there a way to programmatically switch off the 'Variable Declaration Required' option in the VBE (VBE - Tools - Options - Editor - Require Variable Declaration)? I am using Excel 2000 - fully patched. Thanks in advance, Alan. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically switch off "Variable declaration reqiured" in VBE?
The advantage, of course, is that you can combine it with the POWER of "On
Error Resume Next" and have error free code ! But seriously... After so many versions of Excel, Require Variable Declaration is still unticked by default <sigh. Working without Option Explicit is begging for trouble. It really shouldn't be an optional at all. -- Rob van Gelder - http://www.vangelder.co.nz/excel "Bob Phillips" wrote in message ... But why would you? There are no benefits that I know of, and plenty of disadvantages. -- HTH RP (remove nothere from the email address if mailing direct) "Alan" wrote in message ... Hi All, Is there a way to programmatically switch off the 'Variable Declaration Required' option in the VBE (VBE - Tools - Options - Editor - Require Variable Declaration)? I am using Excel 2000 - fully patched. Thanks in advance, Alan. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically switch off "Variable declaration reqiured" in VBE?
"Rob van Gelder" wrote in message ... The advantage, of course, is that you can combine it with the POWER of "On Error Resume Next" and have error free code ! Error free only in the respect that the errors aren't reported! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically switch off "Variable declaration reqiured" in VBE?
Indeed. I was making a joke - I'm funnier in real life - really!
-- Rob van Gelder - http://www.vangelder.co.nz/excel "Bob Phillips" wrote in message ... "Rob van Gelder" wrote in message ... The advantage, of course, is that you can combine it with the POWER of "On Error Resume Next" and have error free code ! Error free only in the respect that the errors aren't reported! |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programmatically switch off "Variable declaration reqiured" in VBE?
I know Rob, my point was really re-emphasising to the OP who might have
thought that it would be useful :-) Bob "Rob van Gelder" wrote in message ... Indeed. I was making a joke - I'm funnier in real life - really! -- Rob van Gelder - http://www.vangelder.co.nz/excel "Bob Phillips" wrote in message ... "Rob van Gelder" wrote in message ... The advantage, of course, is that you can combine it with the POWER of "On Error Resume Next" and have error free code ! Error free only in the respect that the errors aren't reported! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Shortcut to switch from "fill down" to "copy" with mouse drag | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Why does excell switch my stock symbol "ACN" to "CAN"? | Setting up and Configuration of Excel | |||
"Type mismatch" when I try to fill an Array variable with "+" | Excel Discussion (Misc queries) | |||
How to programmatically control "Vary colors by point" | Excel Programming |