?
Solved

GetPrivateProfileString  and  Apostrophes

Posted on 2006-06-13
3
Medium Priority
?
441 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 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