Solved

Format a bunch of values to currency in a msflexgrid

Posted on 2014-01-19
4
271 Views
Last Modified: 2014-01-19
This works, but their may be an easier way to write it
i am loading from a saved udt and a lot of the values need formatting as currency, but not all
gridCardStats.TextMatrix(5, 1) = .tmpLost
    gridCardStats.TextMatrix(5, 1) = Format(gridCardStats.TextMatrix(5, 1), "Currency")
is there a better way to write this ?
0
Comment
Question by:isnoend2001
  • 2
  • 2
4 Comments
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 39792323
Instead of

gridCardStats.TextMatrix(5, 1) = .tmpLost
    gridCardStats.TextMatrix(5, 1) = Format(gridCardStats.TextMatrix(5, 1), "Currency")

just do

gridCardStats.TextMatrix(5, 1) = Format(.tmpLost, "Currency")
0
 

Author Closing Comment

by:isnoend2001
ID: 39793325
thanks. thought there was a better way, been doing it the hard for a long time
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 39793348
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2013
0
 

Author Comment

by:isnoend2001
ID: 39793377
Thanks i am posting another question where i want to show just the part of a file name  after the last "\"
Hopefully you can answer
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

805 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