|
-
Jan 15th, 2007, 04:12 PM
#1
Thread Starter
New Member
Option Explicit defaults to ON in Excel 2003
Someone has passed a rather large s/s to me today to make some mods to, but for some reason "option explicit" is on, even though there is no "option explicit" anywhere in the code and "Tools/Options/Require Variable Declaration" is unchecked. The problem being, within the masses of code I'm faced with hundreds of variable declarations to route out before I can run the s/s, and it needs to be back for the morning!
Any suggestions would be greatly appreciated!
-
Jan 15th, 2007, 05:50 PM
#2
Re: Option Explicit defaults to ON in Excel 2003
Welcome to the Forums.
Since you received the SS they may have had the option checked and added Option Explicit somewhere in one of the modules or classes. Do a Find for "Option Explicit" and comment it out. Although I dont recommend doing it this way to avoid the errors, if time is an issue then I'd say just for now and then go back and fix it after. Who knows you just might find some issues when you fix the variable declarations.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 15th, 2007, 06:00 PM
#3
Thread Starter
New Member
Re: Option Explicit defaults to ON in Excel 2003
No joy I'm afraid - there were a handfull of forms with them, but none in any of the modules or anywhere else for that matter - did search "Entire Project"...
-
Jan 15th, 2007, 07:14 PM
#4
Re: Option Explicit defaults to ON in Excel 2003
Did you look behind the Sheets too? When you run the macros it should error at the offending line or module/sheet/class etc.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jan 15th, 2007, 07:22 PM
#5
Thread Starter
New Member
Re: Option Explicit defaults to ON in Excel 2003
It errors at the first sub of the first module - when ithits the first variable name. All variables should be type variant, but something has globally changed after a few years to stop this..... I just can't figure out what they've done to it!
-
Jan 15th, 2007, 07:36 PM
#6
Re: Option Explicit defaults to ON in Excel 2003
Can you attach the workbook or some of the code at least?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|