Solved

Set value in a masked edit box.... -- Easy 500!!! --

Posted on 2006-07-05
4
188 Views
Last Modified: 2008-03-06
Im trying to set a value in a maked edit box.... I keep getting an Invalid property Value

Mask = "$0.00"
Format = "$#,##0.00"

Trying to set the value in code with txtRefundGst = 0 where txtRefundGst  is the MEB

HEEEELLLLPPPP!!!!!



0
Comment
Question by:ExtremeFitness
  • 2
  • 2
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 17044125

It's not clear what you expect. The mask of $0.00 means that that is the only value that is legal. Try $#.##.
Also you must conform to the mask. Manually it will beep at you, Programatically it raises an error.

So you need
txtRefundGst.Text = "$0.00"
0
 
LVL 2

Author Comment

by:ExtremeFitness
ID: 17044146
Im trying to ver any valid currency.....  
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 17044322
If you are only going to fill it programatically, it would be easier to have a blank Mask.

The format will still work.
txtRefundGst.Text = 1.234
will display as $1.23 if you keep the Format as "$#,##0.00"

If not, you might want to use a mask that is at least as long as the Format:
$9,99#.##
Would be a good match.


0
 
LVL 2

Author Comment

by:ExtremeFitness
ID: 17044452
Ok maybe the Masked edit box is not for me... :)
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question