I have created a custom menu that displays a dialog box when clicked on. I have made the "Browse" button to call a FileOpenDlg() statement. I want the file that the user selects to populate in the EditText space. I would then like to have my app read that string and store it, so that it can be used in a sub procedure when the user clicks run. Any suggestions?
For Example: I want it to behave like a box that asks you to pick a file to upload. The browse button is used to browse for the file, and I want the "run" button to behave like an "upload" button. I was unable to post the picture on here of my dialog box, but that is the concept i am going for. Here is the code for the dialog box and the handler:
Sub Leads Dialog Title "Leads" Width 198 Height 80 Control StaticText Title "Select Leads File" Position 4, 16 Control EditText ID "2" Control Button Title "Browse" Calling PickLeadsFile ID "22" Position 152, 15 Control StaticText Title "Run Leads Update?" Position 4, 52 Control OkButton Title "Run" ID "222" Position 74, 48 Control CancelButton Position 118, 48 End Sub Sub PickLeadsFile Dim Leads_filename As String Leads_filename = FileOpenDlg("C:\Users\dykesb01\Desktop\Test","","XLS","Open Leads File") Alter Control 2 Title From Variable Leads_filename End Sub