473,387 Members | 1,416 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Trying to generate password from text

I am trying to create a tool for work that allows you to enter a 5-7 digit string (can be numbers or letters) and I want to replace the strings with other differt letters and numbers, and reverse the order after click. I am aware of the .replace method but am having a little trouble negoting the syntax... heres an example...

I will enter "AUI65" and I want the program to return x for a or u, z for any integer, and reverse the order the string "zzxxx" insted of "xxxzz"... can someone point me in the right direction? I am trying to learn VB on my own so it is challenging! Thank you!
Dec 10 '10 #1
2 1561
you can do something like this:
Expand|Select|Wrap|Line Numbers
  1. Sub TEST()
  2. Dim myVal1, myvalRev As String
  3.  
  4. myVal1 = "Rodney"
  5. myvalRev = StrReverse(Replace(Replace(myVal1, "o", "1"), "d", "9"))
  6. End Sub\
  7.  
StrReverse is the function you are looking for. You can also stack as many replaces as you need as well, I beleive, I haven't tried more than four, but it should work.

Have fun
Dec 10 '10 #2
Guido Geurs
767 Expert 512MB
You can use the Property "PasswordChar" for a textbox.
All the text in the textbox will be replaced (only for the eye) with the Char of the property.

If You want the letters and numbers be seen as different chars, than you must program it.

Please let me know if the first is sufficient or if You want help with the code?
Dec 10 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: JohnBon | last post by:
Hi Is it possible to get information from a database and generate it to unicode text files using ASP? Is there any product/COM out there that can do this? If not, is there any other...
2
by: Faz | last post by:
I am trying to extract text before a certain character appears in a string. This character is the letter "C". Here is some sample data - the field is called REFERENCE_2: REFERENCE_2...
1
by: Jason | last post by:
I have a form with a textbox and the textmode is set to 'password'. I also have some dropdownlist that poplulate other fields on the form when changed. But everytime the form postsback to the...
6
by: Dan | last post by:
When I try to read the text in a password text box, I get an empty string........ code behind... MyPassword = PasswordTextBox.Text always returns an empty string..... What am I missing? ...
3
by: Jens Jensen | last post by:
Hello, I need to generate a flat text file where aeach is made up os fields and space. To automate the process, i want to define an xml file that describe the file form mate in term of <Lines>...
1
by: ganesh22 | last post by:
hi... I am doing a project asp.net with C#.my requirement I want to do auto generate password for my application that means when user forget his password when he clicks a link it will auto...
1
kirubagari
by: kirubagari | last post by:
i want to do function that after the user input thier email address.the system will auto generate their password and username.How i can come out in php?any one can give me some hide
0
by: Jonathan Boivin | last post by:
If I could give an advice on your method, in fact, what I would do.. is : Generate a password with your lower security set of characters. Then upper case randomizally some letters and finally...
3
by: chris52672 | last post by:
If I have text box 1 (Password Enter) and I have text box 2 (Password Reneter). After text has been entered in text box 1 and the enter key is pressed to make text box 2 active (the curser will...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.