For some design elements (well, most, actually), it’s easier to build a NotesNoteCollection that’s as restrictive as you can make it, then cycle though it, getting NotesDocuments bu NoteID until you find the one with the $Title you’re looking for.
You can also avoid any loops, if you get the unid via the NotesURL property:
Sub Initialize
Dim session As New NotesSession
Dim form As NotesForm
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set form = db.GetForm("MySubForm")
xurl = form.NotesURL
xp = Instr( xurl, ".nsf" )
xunid = Mid( xurl, xp+5, 32)
Set doc = db.getdocumentbyunid( xunid )
formunid = doc.UniversalID
formtitle = doc.~$Title(0)
formhistory = doc.~$UpdatedBy
formdesignerversion = doc.~$DesignerVersion(0)