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: 32
Default Format textbox on exit

I have the following:

Private Sub tbAnnualInterest_Exit(ByVal Cancel As
msforms.ReturnBoolean)

tbAnnualInterest = Format(tbAnnualInterest / 100, "0.0000%")

End Sub


which works fine the first time a value (a percentage entered as 4.9
vs. .049) is entered into the textbox. However, if the textbox is
entered and exited without entering a new value, I get a Type mismatch
error. I've tried using various combinations of Val and/or CStr and
anything else I thought might be useful.

Any suggestions, as always, are greatly appreciated.

TIA
Mike

 
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
Private Textbox Exit Sub question... [email protected] Excel Worksheet Functions 14 March 1st 07 03:58 AM
How To Get An Event To Run When I Exit A TextBox Minitman[_4_] Excel Programming 7 October 22nd 04 11:27 PM
If a called sub exit, how to the caller exit right away? luvgreen[_4_] Excel Programming 4 February 24th 04 05:06 PM
Format Textbox as % Todd Huttenstine[_2_] Excel Programming 2 December 15th 03 12:07 AM
MSForms.TextBox Exit event isn't available in Excel class mosule lacos Excel Programming 2 December 12th 03 10:12 AM


All times are GMT +1. The time now is 06:18 AM.

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

About Us

"It's about Microsoft Excel"