Solved

GetPrivateProfileString  and  Apostrophes

Posted on 2006-06-13
3
418 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…

707 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

18 Experts available now in Live!

Get 1:1 Help Now