Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Format a bunch of values to currency in a msflexgrid

Posted on 2014-01-19
4
Medium Priority
?
310 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 49

Accepted Solution

by:
Martin Liss earned 2000 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 49

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

963 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