If you want to call getprivateprofilestring from another module then it needs to be a public function, however run the check outside the form
Sub LoadForm()
'Graham Mayor - https://www.gmayor.com - Last updated - 18 Dec 2018
Dim oFrm As UserForm1
Dim vList1 As Variant
Dim i As Integer
Dim m As String
m = GetPrivateProfileString32("U:\test.ini", "VersionInfo", "Version")
If m <> ThisVersion Then
MsgBox GetPrivateProfileString32("U:\test.ini", "VersionInfo", "VersionErrorText")
Exit Sub
End If
Set oFrm = New UserForm1
vList1 = Split(GetPrivateProfileString32(IniFileName, "Indexes", "PreCompletion"), "|")
With oFrm
With .ListBox1
.ColumnCount = 2
For i = 0 To UBound(vList1)
.AddItem
.List(i, 0) = i + 1
.List(i, 1) = vList1(i)
Next i
End With
.Show
'do stuff with ofrm
End With
Unload oFrm
Set oFrm = Nothing
End Sub