Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 86,257 VB Programmers. There are 2,044 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a VB Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Left Right Mid Functions

 
Reply to this topicStart new topic

Left Right Mid Functions, Reverse the numbers

gtoman69
post 7 May, 2008 - 08:10 PM
Post #1


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 2



How do I reverse numbers in a mid function

[lblPassword.Caption = Right(txtFirstName.Text, 1)
lblPassword.Caption = lblPassword.Caption & Left(txtLastName.Text, 3)
lblPassword.Caption = lblPassword.Caption & Mid(txtPhone.Text, 2, 2)
lblPassword.Caption = lblPassword.Caption & Mid(txtPhone.Text, 6, 5)]

[lblPassword.Caption = lblPassword.Caption & Mid(txtPhone.Text, 6, 5)]
so if I input 4028985 it reads 85...how do I make it read 58
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Zhalix
post 7 May, 2008 - 08:17 PM
Post #2


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 35

Reverse it with the StrReverse function.

Just wrap the function around any string and the output will be the string in reverse.

You can also wrap it around your mid functions. Like so:

CODE

StrReverse(Mid(txtPhone.Text, 6, 5))


This post has been edited by Zhalix: 7 May, 2008 - 08:30 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/16/08 09:46AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month