Same old subscript out of range error

J

Jason

Ok, i have asked many people about why this occurs (let me finish), but no
reasonable explanations and i am struggling to get my own coding to work.

i wrote this vba sometime back and it was working fine. smooth. quite
recently sombody asked me to run it again and i am bombarded with "subscript
out of range", so i hit the debug button and it highlights a line , which is
absolutely fine (no syntax error, i mean).

somebody suggested that i alter the code a bit, bla bla, but i am only
getting frustrated. is there, any , anyway, to get this working back again??,
(this is why i hate excel, not quite stable at all), but i have no other
option :(

if anybody has found a way around it, just bear in mind that there is a
person in cardiff struggling. please help!!
 
G

Gary''s Student

Hi Jason:

Your frustration is understandable. Please post your code in its entirety
and indicate the offending line and we'll take a look at it.
 
N

Nick Hodge

Jason

Subscript out of range error is caused by your code referencing something
that doesn't exist.

E.G you code says this

Worksheets("sheet1").activate

when a worksheet called sheet1 has maybe been renamed or deleted

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top