473,383 Members | 1,759 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,383 software developers and data experts.

word into array

9
Hi,

How if i want to get

"word"

into

"w"
"o"
"r"
"d"

in vb6

Thanks in advance.
Mar 25 '10 #1
13 1355
Hi vbbb,
Here is my best help. In this example you add one TextBox named Text1, one ListBox named List1 and Command Button named Command1 then in the code section copy and paste my below code. Then only thing left for you is to run it and click Command button.

Private Sub Command1_Click()
Dim i As Integer

For i = 1 To Len(Text1.Text)

With List1
.AddItem Mid(Text1.Text, i, 1)
End With
Next i
End Sub
Hope this helps
Mar 25 '10 #2
vbbb
9
Thank you KinWang for your help.
Mar 25 '10 #3
vbbb
9
Dim strWord As String
Dim i As Integer

strWord = "word"

For i = 1 To Len(strWord )
Print Asc(Mid(strWord , i, 1))
Next i

Very simple step. Tq KinWang.
Mar 25 '10 #4
vbbb
9
How if i want convert number

2 to be 002 and 23 to be 023

Thanks
Mar 25 '10 #5
Good that I have solved your problem. For your next question I would suggest you to use the below code.
Format(Text1.Text, "000")
Hope this helps
Mar 26 '10 #6
vbbb
9
Tq KinWang. I really appreciate it.
Mar 26 '10 #7
vbbb
9
How if from

"w"
"o"
"r"
"d"

to "word". It's return back.
Mar 26 '10 #8
Ha ha ha many questions coming from you. Try using below code.
Text5.Text = Text1.Text & Text2.Text & Text3.Text & Text4.Text
This is the simplest way

Thankx
Mar 26 '10 #9
vbbb
9
Tq for your help. I'm beginner for vb6.
Mar 26 '10 #10
vbbb
9
How if from "word" to

"w"
"wo"
"wor"
"word"
Mar 26 '10 #11
Use below code your question.
Dim i As Integer

strWord = "word"

For i = 1 To Len(strWord )
Print Asc(Mid(strWord , 1, i))
Next i
Let us not flood this thread with our question and answers add me to your yahoo messenger as kinwang_12.

Thankx
Mar 26 '10 #12
vbbb
9
ok kinwang. i'll add you in ym. tq so much.
Mar 26 '10 #13
Use below code your question.
Dim i As Integer

strWord = "word"

For i = 1 To Len(strWord )
Print Asc(Mid(strWord , i, 1))
Next i
Let us not flood this thread with our question and answers add my to your yahoo messenger as kinwang_12.

Thankx
Mar 26 '10 #14

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

Similar topics

0
by: wendy | last post by:
I created com add-in for word2003, excel2003 and powerpoint2003, basically, i added 4 button in toobar and on_click, i apply some bussiness logic. all works in excel2003 and powerpoint 2003, but in...
13
by: Bryan Parkoff | last post by:
I have two variables: "char A" and "short B". I can be able to convert from A to B using explicit case conversion with no problem like "B = short (A);". Right now, I have two variables: "char T"...
11
by: Sandfordc | last post by:
I have tried several time to do this but have been unsucessful. I tried something like: myFunction(charater) str=frm.s1.value sb1=str.substring(0,charater)...
2
by: Pete Mann | last post by:
Hi, Is there anyway to programmatically load a byte array into a word document in c#? We have an application that streams a byte array of a previously saved word document into a c# client. I...
8
by: Frost | last post by:
Hi All, I am a newbie i have written a c program on unix for line by line comparison for two files now could some one help on how i could do word by word comparison in case both lines have the...
1
by: vmoreau | last post by:
I have a text and I need to find a Word that are not enclosed in paranthesis. Can it be done with a regex? Is someone could help me? I am not familar with regex... Example looking for WORD:...
18
by: Neehar | last post by:
Hello For one of the interviews I took recently, I was given an offline programming quiz. In 30 minutes I had to write code in C++ to counts the number of times each unique word appears in a...
6
by: boyindie86 | last post by:
Hi I have been fighting with this lump of code for the last week what I am trying to do is that I am passing words into passages of texts, and I want the system to go and find exact word matches...
11
by: arnuld | last post by:
C takes input character by character. I did not find any Standard Library function that can take a word as input. So I want to write one of my own to be used with "Self Referential Structures" of...
209
by: arnuld | last post by:
I searched the c.l.c archives provided by Google as Google Groups with "word input" as the key words and did not come up with anything good. C++ has std::string for taking a word as input from...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.