Hi
I have a Windows Form that I use to prompt the user. It is loaded with a list that the user
has to make a selection from.
I have an OK button that then runs the rest of the code.
Is there a way to pause the code, show the form and then run the rest of the code
without havening to channel it through the OK button?
In essence, I want the Windows form to gather feedback just like the OpenFileDialog would in the
following code and gather feedback from the user
With Globals.ThisAddIn.oAUTOMATOR.OpenFileDialog1
.FileName = ""
.InitialDirectory = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
.Filter = Nothing
'.AddExtension
.ShowDialog()
sFileAndPath = .FileName
sPath = System.IO.Path.GetDirectoryName(sFileAndPath)
sFile = System.IO.Path.GetFileName(sFileAndPath)
oSource_File = sFileAndPath
End With
That will cause another problem: the line that follows check for .FileName which will be empty at best.
That means that you cannot have code after .Show that is dependant on the result of the dialog box.