Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,104
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
How can I modify my code to offset the defined range and repeat theprocedure instead of duplicating my code? [email protected] Excel Programming 4 May 29th 09 10:13 PM
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does ker_01 Excel Programming 6 October 3rd 08 09:45 PM
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... Corey Excel Programming 4 November 25th 06 04:57 AM
Excel code convert to Access code - Concat & eliminate duplicates italia Excel Programming 1 September 12th 06 12:14 AM


All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"