Heres my complete function. Works perfectly. No problems no errors. Nothing. Just smooth work.
If ya got any idea's on how I could make it smaller, or something else. Let me know. Thanks again to anyone that helped me while I was working on this.Code:Public Sub LoadFunctions(INI As String, z As String) On Error Resume Next Dim a As String Dim ReadLoadForm Dim ReadProgram Dim ReadWebpage INIFile = "buttonconf.ini" ProgPath = App.Path If Right(App.Path, 1) <> "\" Then ProgPath = App.Path & "\" INI = ProgPath & INIFile a = "BUTTON " & z ReadLoadForm = INIGetSettingString(a, "LoadForm", INI) GetForm = ReadLoadForm If GetForm = "" Then GoTo CheckProgram ElseIf GetForm = "Drive" Then Form1.Show Form1.SetFocus ElseIf GetForm = "System" Then Form2.Show Form2.SetFocus ElseIf GetForm = "Network" Then Form3.Show Form3.SetFocus ElseIf GetForm = "Processor" Then Form4.Show Form4.SetFocus ElseIf GetForm = "Motherboard" Then Form5.Show Form5.SetFocus ElseIf GetForm = "Memory" Then Form6.Show Form6.SetFocus ElseIf GetForm = "Video" Then Form7.Show Form7.SetFocus ElseIf GetForm = "About" Then Form8.Show Form8.SetFocus ElseIf GetForm = "Finish" Then End Else MsgBox "Your configuration is incorrect. Please fix the changes.", vbCritical, "Error!" End If CheckProgram: ReadProgram = INIGetSettingString(a, "Program", INI) GetProgram = ReadProgram If GetProgram = "" Then 'Blah ElseIf GetProgram = "INTERNET" Then ReadWebpage = INIGetSettingString(a, "Webpage", INI) If ReadWebpage = "" Then Webpage = "http://www.uo.clankoa.com" ShellExecute 0&, vbNullString, Webpage, vbNullString, vbNullString, vbNormalFocus Else Webpage = ReadWebpage ShellExecute 0&, vbNullString, Webpage, vbNullString, vbNullString, vbNormalFocus End If Else Open App.Path & "\temp.bat" For Output As #1 Print #1, GetProgram EndBatFile = "end" Print #1, EndBatFile Close TempLoad = ProgPath & "temp.bat" Shell TempLoad, vbHide Sleep (100) Kill TempLoad End If End Sub





Reply With Quote