Okay here is my problem. Once someone connects to the server I want a menu to be enabled. If he or she is not connected its disabled. So far I can connect to the server and make it show a message box. Once I click okay it closes, then comes the code
Where it says If (conn.Close) it produces and error (the conn.Close is underlined) and says Expression Does not Produce a Value.Code:Public Sub ToolsToolStripMenuItem() Try conn.Open() MainFormReference.ToolsToolStripMenuItem.Enabled = True Catch ex As Exception If (conn.Close) Then End If End Try End Sub
Can anyone help me fix this?




Reply With Quote