String Manupulation

M

Mili

Hi,

I am trying to display the character in a string one
by one in a message box. I am not getting how to do it.

I am using Microsoft Office 2000. (using Macro)

Thanks

Regards

Mili
 
C

Chip Pearson

Mili,

I'm not sure exactly what you want, but maybe the following will be of use.

Dim N As Integer
Dim S As String
S = "test"
For N = 1 To Len(S)
MsgBox Mid(S, N, 1)
Next N


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
M

mili

Hi,

How to get the charcode of the character I am displaying.

for example we have Chr$(charcode)
in the same way can we display charCode if we know the
character ??

Thnaks

Regards

Mili.
 
M

mili

Hi,

How to get the charcode of the character I am displaying.

for example we have Chr$(charcode)
in the same way can we display charCode if we know the
character ??

Thnaks

Regards

Mili.
 
C

Chip Pearson

Mili,

You can use the Asc function to return the character code. For example,

Asc(Mid(S, N, 1))


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top