You can save txt with the ini extension and save your settings in it as key pairs. Using the code below, you can get these settings by providing a key and getting a value.
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long Public Function GetINIString(ByVal sApp As String, ByVal sKey As String, ByVal filepath As String) As String Dim sBuf As String * 256 Dim lBuf As Long lBuf = GetPrivateProfileString(sApp, sKey, "", sBuf, Len(sBuf), filepath) GetINIString = Left$(sBuf, lBuf) End Function Sub sample() Dim Path As String Path = ThisWorkbook.Path & "\" & "Path.ini" Link = GetINIString("Path", "Link", Path) End Sub
Save the .ini file in the same folder as the workbook, or you can modify the Path variable accordingly.

You can also refer to link for more details.
source share