I think Its me, but the below simply repeatedly loops through and gets only the first script. I am a little puzzled as to how to tell it to go to the next script text file, it is my understand the While should do it, but I think I messed up teh code and can't get it to work.
Private Sub Recovery()
'Recovers objects for a specific database.
Dim strObjectName As String
txtPath = "K:\DatabaseDevelopment\DBScripts_RegE\"
txtFile = Dir(txtPath & "*.txt")
While txtFile <> ""
Select Case Left(txtFile, InStr(txtFile, "_") - 1)
strObjectName = Left(Mid(txtFile, InStr(1, txtFile, "_") + 1), InStr(1, Mid(txtFile, InStr(1, txtFile, "_") + 1), ".") - 1)
Application.LoadFromText acForm, strObjectName, txtPath & txtFile
MsgBox "Form: " & strObjectName & " has been imported.", vbOKOnly