LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Setting Focus not working as expected

I am verifiying data by VBA. When it traps an error, I am trying to go back
to the control that caused the error. It's not working for me.

Code:
Select Case intLoan_Spread 'as entered in user form
Case Is intMaxLoan_Spread 'max is 1000
msgstring3 = "Maximum loan spread is " & intMaxLoan_Spread &
". " & msgstring3
MsgBox (msgstring3)
Me.TXBBasisPoints = intMaxLoan_Spread
Cancel = True
Me.TXBBasisPoints.SetFocus
Case Is < intMinLoan_Spread 'min is 100
msgstring3 = "Minimum loan spread is " & intMinLoan_Spread &
". " & msgstring3
MsgBox (msgstring3)
Me.TXBBasisPoints = intMinLoan_Spread
Cancel = True
Me.TXBBasisPoints.SetFocus
Case Else
'passes validation


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workdays not working as expected Rotata Excel Discussion (Misc queries) 4 January 16th 09 09:31 PM
Iserror not working as expected NathanG Excel Worksheet Functions 5 February 1st 07 05:31 PM
Setting the focus Orf Bartrop New Users to Excel 4 August 9th 06 05:36 AM
Lookup Not working as expected trumpy81 New Users to Excel 5 June 30th 05 07:41 PM
setting the focus using VB Yan Robidoux[_7_] Excel Programming 4 August 16th 04 09:42 PM


All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"