Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
New PC and my code doesn't run...
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
New PC and my code doesn't run...
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 -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Chris Gorham" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
New PC and my code doesn't run...
From the VBA Menu:
Tools Options... Editor and clear the require variable declaration checkbox -- Gary''s Student - gsnu200908 "Chris Gorham" wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
New PC and my code doesn't run...
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 "Bernard Liengme" wrote in message ... 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 -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "Chris Gorham" wrote in message ... 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
New PC and my code doesn't run...
In the VBE: Tools/Options and untick "Require Variable Declaration" Sam "Chris Gorham" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
How can I modify my code to offset the defined range and repeat theprocedure instead of duplicating my code? | Excel Programming | |||
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |