PDA

View Full Version : Solved: Subscript Error



bopo
01-09-2007, 03:19 PM
Hi People


Basically I am using vlookup to pull some values in two lables within my form, which works, I have since added the exact same routine to import some other information, and I get the following error:

Subscript out of range (Error 9)

I have ensured I am referecing the correct colums and sheet, but I just cannot find out whats wrong, help appriciated :)

Bob Phillips
01-09-2007, 03:42 PM
So you expect us to look at both of those userforms, figure out what it is trying to do, run it, and debug it, without any sort of suggestion as to where the problem might be?

bopo
01-09-2007, 03:50 PM
Well I know where the problem is, its the coding behind the textbox named txtaccommodation1 on the second form, I have used the EXACT same code for the same effect, hence why I cant figure out why its not working, because it works for the other 2 text boxes

Bob Phillips
01-09-2007, 04:03 PM
The sheet is called " Accom Data", not "Accom data" - note the leading space.

bopo
01-09-2007, 04:07 PM
Yeah I can see the space now, amazing how you spotted that lol, working perfectly now, thanks :D

Bob Phillips
01-09-2007, 04:10 PM
Once I knew where the error was and I looked at the code (which looked fine), it was the only thing it could be.