Excel Run Time Error - Visual Basic

  Taff36 13:09 10 Nov 03

I have used an Excel add on from Excel 97 days very successfully for may years. It is the Expenses template by Village Software. I recently had need to correct one of my sales managers expense files. (He had got into all sorts of format problems) Having sorted that out (I thought) every time I open the file the following message appears from Microsoft Visual Basic: Run Time Error`9 Subscript out of range.

Still seems to work OK but it is irritating and obviously means something. Excel help files haven`t given me a clue. Any ideas please?

  BurrWalnut 14:14 10 Nov 03

Very difficult to determine but it's probably a Dim statement which is being referenced out of its range.

You'll have to go through the code to find it.

  Taff36 14:20 10 Nov 03

Statement - I am DIM !!!!

Could you give me a clue what you mean? I have no real idea what VBA does nor what a Dim statement is. (Out of range I understand though!)Where do I start looking for the code? Note that the error message doesn`t give me the option to debug - not that I could anyway.

  graham?v 14:28 10 Nov 03

Dunno what it means click here

  Taff36 15:53 10 Nov 03

We meet again - thought of changing your name..... sorry not funny.

I don`t understand this either. Give me a word problem anyday. I tried to get into the visual basic editor for this excel file and it is password protected but I really dont know what I`m looking for anyway.

Doesn`t look like VoG is around this afternoon either. Never mind I`m sure he`ll pick something up before tomorrow and point me in the right direction.It`s not desperate just an annoyance. Which gives me an idea.

  VoG II 17:40 10 Nov 03

When you get the error message, do you get the option to Debug?

Do you have access to the VBA code or just a "hidden" add-in.

It is probably an error in a Dim statement that is used to declare an array variable, like:

Dim X(10)

If the code then tries to put a value in X(11), a subscript out of range error will occur. The same with X(0).

  Chris the Ancient 19:26 10 Nov 03

Taff36 is nearest with his password thoughts. I once tried to play with the village thingy, but there is now way to get into the code and play. I think we'll be hard pushed to really sort this - unless someone knows the password. ;o))

Taff, have you got a way of going back to an original undamaged sheet and working forward?


  VoG II 20:05 10 Nov 03

Sorry for my earler question re debug - I didn't read the earlier post properly.

I can probably find the password (but I'm not going to say how). I'll e-mail you Taff36.

  Taff36 09:48 12 Nov 03

Many thanks - Problem resolved.

VoG to my rescue - he managed to remove the password protection and discovered that I had renamed one of the sheets (Guilty as charged). Renaming the sheet to it`s original name sorted the problem.

This thread is now locked and can not be replied to.

Microsoft Surface PC release date, price and specs: All-in-one Surface PC to directly rival iMac

1995-2015: How technology has changed the world in 20 years

Best Photoshop video tutorials: 8 video tutorial websites for Photoshop

Apple's event invitations decoded: A look back at 16 of Apple's most cryptic invites | Clues in…