ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do I turn off option explicit statement in VB (https://www.excelbanter.com/excel-programming/313991-how-do-i-turn-off-option-explicit-statement-vbulletin.html)

Glen

how do I turn off option explicit statement in VB
 
I can't get some projects to work without turning it off but have no idea how
to do it.

Tom Ogilvy

how do I turn off option explicit statement in VB
 
select the line that says

Option Explicit

at the top of the module and delete it.

Of course the standard advice is to fix the problems identified by Option
Explict - otherwise, you may not get correct results even it it runs.

--
Regards,
Tom Ogilvy


"glen" wrote in message
...
I can't get some projects to work without turning it off but have no idea

how
to do it.




Andy Pope

how do I turn off option explicit statement in VB
 
Hi,

For existing code you can simply comment out the Option Explicit line.

To stop it automatically appearing at the top of new code use the menus
within VBE, Tools Options. On the editor tab is a checkbox 'Require
Variable Declaration'.

Cheers
Andy

glen wrote:

I can't get some projects to work without turning it off but have no idea how
to do it.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


All times are GMT +1. The time now is 11:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com