There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen blue screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem ram router slow sound trojan usb video virus vista windows windows vista windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Solved: Visual Basic question


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
GUSMAN's Avatar
Senior Member with 721 posts.
 
Join Date: Dec 2001
Location: WALES
25-Mar-2005, 02:50 PM #1
Red face Solved: Visual Basic question
Hi Guys,
I have written a programme as an assignment that calculates interest on withdrawals and deposits, etc.
I have the charges for withdrawals and deposit bonuses displayed in labels after calculations have been made, but if their value is for instance 4.50 they show as 4.5. Is there any way to get them to display as 4.50 for example, and how would I go about getting a £ sign in front ie £4.50.
Sorry for the daft question but it took a while to do and any front end improvements would look better.
Cheers guys
Gus
Arky's Avatar
Senior Member with 548 posts.
 
Join Date: Aug 2004
Experience: Advanced
25-Mar-2005, 03:04 PM #2
Look up numeric format in VB help index, it will lead you to Format Function and example code.
Born2Code's Avatar
Junior Member with 1 posts.
 
Join Date: Mar 2005
Experience: Intermediate
26-Mar-2005, 02:03 AM #3
Hello GUSMAN,
You might need to increase the size of the label little bit to show the full number. Just a suggestion. Good Luck.
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,565 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
26-Mar-2005, 02:33 PM #4
You could convert the Value to a String and then add the "£" on the front, you may have to "strip off" the invisible "+" sign on the value.
GUSMAN's Avatar
Senior Member with 721 posts.
 
Join Date: Dec 2001
Location: WALES
27-Mar-2005, 04:27 AM #5
Thank You all for the replies, Really Appreciate it.
I Will be away this weekend but will be giving your suggestions a try as soon as possible.
Thanks once again
Gus
GUSMAN's Avatar
Senior Member with 721 posts.
 
Join Date: Dec 2001
Location: WALES
27-Mar-2005, 04:43 AM #6
Hi Guys
To Arky: Having Problems displaying help file but will have a look in VB book now I know what to look for.
To Born to code: cheers for that. the label size was fine though so I will look at the format.
To OBP: I put a £ & 1.50 in code and it kept saying "Variable not defined", Highlighting the £ sign. But when I enclosed the £ in "" Ie. "£" & 1.50 I had the result I wanted £1.50.
Great Stuff I always get good support here. I will sort out the other little problem so you can say I have had my question answered, and thanks once again.
Sorry if the questions are a bit simple but it is hard to start off, as you can appreciate.

Gus

Ps I may be back (lol) Cheers
OBP's Avatar
OBP OBP is offline
Computer Specs
Distinguished Member with 6,565 posts.
 
Join Date: Mar 2005
Location: UK
Experience: An old Basic Programmer
27-Mar-2005, 06:32 AM #7
Gus, we have all been there.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 05:14 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.