New PC and my code doesn't run...

C

Chris Gorham

Hi,

I have a new PC & I'm running code in a workbook that previously was
fine...Excel 2003 enviroment as before.
Now the VBA editor is kicking out an error for every variable that hasn't
been dimensioned.
Ok. I've been lazy and not inserted an Option Explicit to force dimensioning
in this code in the past.
Strangely though other code works fine and a brief test with a 3 line
routine worked ok...
Anybody got any suggestions as to what may have happened...

Chris
 
B

Bernard Liengme

In the VB Editor, open the Tools | Options menu.
Is the second item "Required Variable Declaration" checked ? This is
equivalent to Option Explicit
Try unchecking it
best wishes
 
G

Gary''s Student

From the VBA Menu:

Tools > Options... > Editor > and clear the require variable declaration
checkbox
 
T

Tim Williams

I belive all that option does is automatically put "Option Explicit" at the
top of any *new* modules.
It doesn't enforce declariation directly.

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top