vegasrockstar
Programmer
Hi
I have an ini file that I am reading to get parameters for my VBA macro. For set length values I have no problem using the code below to extract the string from the ini file. However, if I want to extract a file path that may have different lengths I do not know how to handle that. Any ideas you very smart people?
Public sFileContents As String
Public strExample As String
Public point As Integer
point = 0
point = InStr(sFileContents, "Example=")
If point > 0 Then
strExample = Mid(sFileContents, (point + 8), 4)
Else
GoTo ErrHandle
End If
Many thanks in advance
I have an ini file that I am reading to get parameters for my VBA macro. For set length values I have no problem using the code below to extract the string from the ini file. However, if I want to extract a file path that may have different lengths I do not know how to handle that. Any ideas you very smart people?
Public sFileContents As String
Public strExample As String
Public point As Integer
point = 0
point = InStr(sFileContents, "Example=")
If point > 0 Then
strExample = Mid(sFileContents, (point + 8), 4)
Else
GoTo ErrHandle
End If
Many thanks in advance