Solved

Strptr Example

Posted on 1998-08-09
1
488 Views
Last Modified: 2008-02-01
How can I access each character in string, I see a undocumented feature called strptr in VB 5.0.  How about a good example.
0
Comment
Question by:wesjon
1 Comment
 
LVL 2

Accepted Solution

by:
percosolator earned 20 total points
ID: 1468379
Didn't know about the StrPtr.  Looks to be that that function returns a memory address for the string.

You want to use a string function called "Mid$"

Example:
-----------------------------------

Sub LoopStr(S as String)

   Dim I as Integer

   For I = 1 To Len(S)

      MsgBox Mid$(S, I, 1)

   Next I

End Sub
-------------------------------

This routine iterates through each character in the string, and MsgBox's it to you, one at a time.

If you need more clarification, let me know.

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA/SQL - Connect to SQL server and pull data 4 119
vbModal 12 57
how to Classify of email (pdf attachments) 7 45
add criteria to query in VB, Access 2003 2 10
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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

830 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