Solved

GetPrivateProfileString  and  Apostrophes

Posted on 2006-06-13
3
423 Views
Last Modified: 2012-06-27
Im trying to use GetPrivateProfileString  to get 'TEST' from an INI but it keeps returning TEST  // notice there are no apostrophes.

Any ideas?

Thanks
0
Comment
Question by:tricks801
3 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 16895912
u tried

"'TEST'"

wrap it in single quotes?

or perhaps use

chr$(39 & "TEST" & chr$(39)


I think chr$(39) is '

0
 

Author Comment

by:tricks801
ID: 16896018
yes, but that wasnt an easy fix. Instead I use a replace when reading/writing to the ini...Replace(myString,"'", "`")
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 16896978
It shouldn't remove the characters from the buffer, post the code your using to get the values.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

831 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