Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Format a bunch of values to currency in a msflexgrid

Posted on 2014-01-19
4
Medium Priority
?
302 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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

715 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