Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Run-time error'9' Subscript out of range. How do I sort? Please

I have a monthly accounts system that when i 'create new period' it moves my
closing stocks forward to become new period opening stocks. Its worked for
years but now I get a Box headed Microsoft Virtual Basic and it says Run-time
error '9' and below it says Subscript out of range.
The Debug box, when pressed, runs for ever and the Help box, when pressed,
give me help in what to me is gobbldygook. Is ther a simple answer please.
Window xp. Excel
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Run-time error'9' Subscript out of range. How do I sort? Please

You get an error 9 when you attempt to access an item that does not exist in
a collection or access an element outside the bounds of an array. For
example,

Debug.Print Worksheets("SheetName").Name

will blow up with an error 9 if "SheetName" doesn't exist. Similarly,

Dim V(1 To 3)
Debug.Print V(4)

will blow up since V has only 3, not 4, elements.

Step through your code by pressing F8 to step from line to line, determine
the line of code that causes the error, and post the code here.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"
om wrote in message
...
I have a monthly accounts system that when i 'create new period' it moves
my
closing stocks forward to become new period opening stocks. Its worked for
years but now I get a Box headed Microsoft Virtual Basic and it says
Run-time
error '9' and below it says Subscript out of range.
The Debug box, when pressed, runs for ever and the Help box, when pressed,
give me help in what to me is gobbldygook. Is ther a simple answer please.
Window xp. Excel


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
what does 'Subscript Out of range' mean?? Gary Excel Worksheet Functions 2 March 22nd 07 01:33 AM
9: Subscript out of range jenz21985 Excel Discussion (Misc queries) 6 May 5th 06 03:36 PM
Run Time Error 9 (Subscript out of Range) for XLA file ExcelMonkey Excel Discussion (Misc queries) 3 October 5th 05 03:34 PM
Subscript out of range error moglione1 Excel Discussion (Misc queries) 2 August 30th 05 01:21 PM
Run time error 9 : Subscript out of range JAtz_DA_WAY Excel Discussion (Misc queries) 6 August 29th 05 08:26 PM


All times are GMT +1. The time now is 05:02 AM.

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"