OK So I'm in a small rut in one of my programs...... I don't know if it even can be done, but I'd like to know how to state coding in a massive dim........Such as like Dim BigIF as ????(<-What do I call this if it can be done/can it even be done in dim?) BigIF=If this0 then If this1 then If this2 then If this3 then If this4 then If this then Do this. In truth, It isn't neccessary(because i could just re-write the coding), it will just save me about 50 lines of coding.....
OK what I mean is to take a formula (such as: if y>1 and x<1 and z=1 then Q.caption="1") and dim it as a variable....Long(as far as I understand it) Won't allow me to use coding statements such as if/then/else....and thats what i need to use.........
Still I am not sure but whatever condition you wish you can give? if y>1 and x<1 and z=1 then Q.caption="1" is very much possible. Also dimming inside the ifs is also possible.
I Was just wondering what statement you should use to dim the total statements:[ if y>1 and x<1 and z=1 then Q.caption="1"] and call it by a name such as : Bob OK..I'll try to explain a little better.... I want to say somethign like dim water as ?? (i don't know what its called) water= { if y>1 and x<1 and z=1 then Q.caption="1"} so i can use it like this.... If label1="32" then Water and it will put the statement called "water" where the word ( "water" ) is used.....
Nope that is not possible in VB as far as I know but I am not a VB expert. What you are saying are something like macros in C++
Ok thank you ...... Another question i Have is ..... I have an imagebox...I want you to have a list of options for what to do with this item(thats in the imagebox) come down when you right click(Which i'm assuming is the dblclikc option....)...How could i do that or something similar to it.....? Thanks *Ches
Are you saying that you want to use that long IF code constantly throughout your program? If so, put it in a private sub, then just call it when you want to use that code. So... Code: 'declare sub private sub water() 'put if code here if y>1 and x<1 and z=1 then Q.caption="1" end sub Then whenever you want to use that code, just call the sub: Code: call water()