View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default accept fractions from textbox

Hi,

Textboxes (unsurprisingly) return text so you need val

mynumber = Val(UserForm1.TextBox2.Value)

Mike

"brianbanksia" wrote:

I cannot enter fractions in a TextBox and have them recognised as numbers.

If IsNumeric(UserForm1.TextBox2.Value) = False Then 'Quantity
MsgBox "Choose NUMERIC quantity. Transaction cancelled!", , "Company Name"
End If

I am having trouble getting this to work in Excel 2007; Vista whereas works
Excel 2003 XP.

Is there a better way or is it a machine setting problem rather than Excel
(eg Universal Date settings etc)
Thanks B