Signature (Visual Basic / VBA)
Public Function GetProfileString( _
ByVal vKeyName As Variant _
, Optional ByVal vDefault As Variant _
, Optional ByVal vSectionName As Variant _
) As Variant
Code Example
Assuming
Dim estWAPI As New WindowsAPI
estWAPI.ProfileSectionName = "Sample Section"
estWAPI.WriteProfileString("Convert From", "5 kilometers") = True
for example
estWAPI.GetProfileString("Convert From") = "5 kilometers"
Parameters
| Parameter | Description |
|---|---|
| vKeyName | Name of the String setting whose value is to be retrieved. Function returns Null if vKeyName is Null or cannot be fixed-up to a String. |
| vDefault | Default value that will be returned by this function where there is no setting with the specified Name. vDefault defaults to an empty string ("") if it is missing or Null or cannot be fixed-up to a String. |
| vSectionName | The Section within the Profile file or Windows Registry that contains the Setting. vSectionName defaults to the current value of the ProfileSectionName Property if it is missing or Null or cannot be fixed-up to a String. |
Notes & Version History
| v1.3 Change | Removed 16-bit support from this function. |