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: 1
Default VBA - not working

Hi

I am trying the way you told me, but is not working right. I guess I a
missing something.

when I run it, I allways get the MsgBox "Value must be between 0.0
1.0", no mather the value.

Private Sub PercentTB_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim Min As Variant
Dim Max As Variant

PercentTB.Value = Format(CSng(PercentTB.Value), "##.#%")

Min = Format(CSng(0), "##.#%")
Max = Format(CSng(1), "##.#%")

If (PercentTB.Value < Min) Or (PercentTB.Value Max) Then
MsgBox "Value must be between 0.0 - 1.0", vbOKOnly
Cancel = True
End If
End Su

--
Message posted from http://www.ExcelForum.com

 
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
F4 not working Papa Jonah Excel Discussion (Misc queries) 4 October 21st 08 08:21 AM
Calculate working days but change working week SamB Excel Discussion (Misc queries) 1 September 1st 08 09:17 PM
working with % Kirk Excel Discussion (Misc queries) 2 August 19th 08 01:23 PM
Making weekend days working days - the system cuts the working tim Fluffy Excel Discussion (Misc queries) 1 May 30th 08 10:02 PM
Adding sales from a non working day to the previous working day Alex Excel Programming 1 September 19th 03 08:48 AM


All times are GMT +1. The time now is 09:48 PM.

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"