PDA

View Full Version : putting info into textboxes???



mickros
09-21-2007, 02:19 PM
hey everyone,

i looked through to see if there were other posts on this and there were but i think i have a different problem to theirs. i have text file with data in it that i saved in there via an array. i want to put this info back into the textbox but so far no luck. im fairly new at vba and just havent learnt it yet. here's some of the code i have done. can anyone see where i am going wrong????

thanks

Bob Phillips
09-24-2007, 05:08 AM
You have mis-spelt the array name here



strRecordFound = mclubAray(intIndex)


it should be



strRecordFound = mclubArray(intIndex)


You should use Option Explicit in your modules.

fumei
09-24-2007, 10:33 AM
No question about it.

Use Option Explicit. This is exactly what is it for. To turn it on, in the VBE go Tools > Options and check Require Variable Declaration on the Editor tab.

NOTE: this will automatically put Option Explicit into any new modules. It will not put Option Explicit into any existing modules. It would be worth your while to put it into your existing modules.

Just write Option Explicit on the very first line.

mickros
09-29-2007, 02:09 AM
hey,

thanks for noticing my spelling error but thats definately not the problem. i actually copied that from the page of code i had printed so unfortunately it was my spelling mistake. i do have option explicit on so it would have detected it if i had made the mistake. i still have the same problem though...

TonyJollans
09-29-2007, 07:40 AM
I'm afraid I don't understand what you're doing. Could just be me (it often is) but as no-one else has responded, I suspect not. Could you give a bit more detail please?