Begin Dialog SelectFile 14,16,198,128,"Select File", .displayit OKButton 10,85,32,11, "OK", .OKButton1 CancelButton 71,85,32,11, "Cancel", .CancelButton1 Text 10,5,26,9, "File", .Text1 Text 44,5,99,13, "Filename", .TextFilename1 PushButton 161,6,20,10, "...", .btnFileSelect1 GroupBox 35,0,121,23, .GroupBox1 Text 9,40,26,9, "File", .Text1 GroupBox 36,33,121,23, .GroupBox1 Text 43,39,99,13, "Filename", .TextFilename2 PushButton 163,39,20,10, "...", .btnFileSelect2 End Dialog Option Explicit Dim sFilename1 As String Dim sFilename2 As String Dim bExitScript As Boolean Sub Main Call menu() If Not bExitScript Then Else MsgBox "Script Canceled" End If End Sub Function menu() Dim dlg As SelectFile Dim button As Integer button = Dialog(dlg) End Function Function displayit(ControlID$, Action%, SuppValue%) Dim bExitMenu As Boolean Select Case Action% Case 1 Case 2 Select Case ControlID$ Case "btnFileSelect1" 'changed to btnFileSelect1 as both buttons where named the same, they must be different sFilename1 = getFile() 'change the variable so that it is the same as defined Case "btnFileSelect2" 'changed to btnFileSelect1 as both buttons where named the same, they must be different sFilename2 = getFile() 'added the variable to obtain the second filename Case "OKButton1" bExitMenu = True Case "CancelButton1" bExitMenu = True bExitScript = True End Select End Select If bExitMenu Then displayit =0 Else displayit =1 End If If sFilename1 = "" Then 'updated the variable name DlgText "TextFilename1", "Please Select a file" Else DlgText "TextFilename1", isplit(sFilename1, "", "\", 1, 1) 'added the iSplit so that you only have the filename and not full path. End If 'added the code to display the second file. If sFilename2 = "" Then DlgText "TextFilename2", "Please Select a file" Else DlgText "TextFilename2", isplit(sFilename2, "", "\", 1, 1) End If End Function Function getFile() As String Dim obj As Object Set obj = Client.CommonDialogs getFile = obj.FileExplorer() Set obj = Nothing End Function