Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 05-07-2015, 12:42 PM
NoSparks NoSparks is offline UserForm textbox exit event activated with navigation buttons...why?  help? Windows 7 64bit UserForm textbox exit event activated with navigation buttons...why?  help? Office 2010 32bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Quote:
My guess is that the exit event on the customer textbox is being activated whenever any of the navigation buttons are being depressed. I do not know why this is.
I believe the cancel=true part keeps the focus with the text box and you can't go anywhere else on your form without exiting the text box first, so as you suspect the procedure runs again. You're stuck in a loop there until the requirements of the text box are satisfied.

Personally I wouldn't do that check until just before writing the info to the spreadsheet, then I'd check everything, one after the other, in the order things get entered, and set focus to anything not acceptable, displaying a message at that point, and exiting the write sub.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't use RTF Textbox in Userform (Word2007) dherr Word VBA 2 03-16-2015 07:50 AM
UserForm textbox exit event activated with navigation buttons...why?  help? Userform VBA Textbox Calculation MarkAn Word VBA 2 08-15-2014 06:50 AM
Hyperlink not activated by footpedal Donone PowerPoint 2 05-05-2014 04:42 AM
UserForm textbox exit event activated with navigation buttons...why?  help? Display result in textbox based on the input of another textbox scarymovie Word VBA 5 05-16-2012 07:05 PM
UserForm textbox exit event activated with navigation buttons...why?  help? Number format in Textbox on userform officeclerk Excel Programming 2 04-17-2012 01:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft