LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default Option Explicit and Arrays

Just caught a typo.

In Excel 97 VBE, the following general module code doesn't generate a compile
error.

'---- begin VBA ----
Option Explicit

Sub foo()
Dim n As Long
n = 5
ReDim y(1 To 5) '<- !!
MsgBox n
End Sub
'---- end VBA ----

Is the ReDim line an array variable declaration similar to Dim, or a statement,
or a hybrid? Does this work the same in 2K and XP?

--
Never attach files.
Snip unnecessary quoted text.
Never multipost (though crossposting is usually OK).
Don't change subject lines because it corrupts Google newsgroup archives.
 
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
Remove explicit formatting only Mitch Powell Excel Discussion (Misc queries) 6 September 9th 09 09:47 PM
conditionl format overrides explicit format John Keith Excel Discussion (Misc queries) 2 July 16th 08 03:16 PM
Option Explicit [email protected] Excel Discussion (Misc queries) 5 April 30th 08 11:19 PM
how to create a chart from the source which does not have explicit numbers [email protected] Charts and Charting in Excel 5 February 6th 07 08:01 PM
option explicit Dave F Excel Discussion (Misc queries) 2 September 5th 06 02:46 PM


All times are GMT +1. The time now is 03:07 AM.

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

About Us

"It's about Microsoft Excel"