This is the last of my questions for today. I know that I've seen the code for this somewhere but I don't remember where. Is there a quick and easy way to do this?
Put this in the on of the Key events (Down or Press, can't remember which, the one with Key as a parameter)
and then
If Key = vbKeyTab then
Text1.selstart = 0
text1.sellength = len(text1.text)
end if
But thats not quite it.
I can't remember if there is another parameter for whether the Shift key is pressed or not, I think I did it by havig a module scoped boolean storing if the shift key has been pressed, and then the next time round it checks for the tab key aswell.
Of course, you must set TabStop = FALSE on ALL the controls on the form, and write code to stop VB from automatically switching them back on (which it will)
Of course, if you WANT the tabstops to work AS WELL, you'll have to write in your own code to do that on the rest of the control 'cos you had to switch them all off.
To summarize
Its loads of work, do something else if you can
Jim.
not much help, but it may point you in the right direction.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.