Solved

Assigning pictures to letters

Posted on 2003-10-30
1
247 Views
Last Modified: 2010-05-03
Ok this is what i need, when you type your name into a textbox and click a button the code will assign a picture to each letter in the string.

i am trying a for next loop, i have the string lenght by using Len, but how do i get it to search for each character and output the coressponding picture.

Cheers
0
Comment
Question by:col_jack_oneal
1 Comment
 
LVL 18

Accepted Solution

by:
bobbit31 earned 70 total points
ID: 9653227
Dim curChar as String

Public Sub Command1_Click()
  for i = 1 to Len(Text1.Text)
     curChar = Mid(Text1.Text, i, 1)

     '' curChar will now contain the current character in the string
     if curChar = "A" Then
        PictureBox1.Picture = LoadPicture("<path to image for letter A>")
     elseif
        etc... '' you could also use a SELECT CASE clause if you don't want if then else
     end if
  next

End Sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
I need help using System.Web.HttpUtility.HtmlEncode in my VB.Net application 3 61
VB6 ListBox Question 4 34
vbModal 12 38
IF ELSE Statement in Excel Macro VBA 16 36
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now