Client.OpenDatabase

23 posts / 0 new
Last post
MagiBzh
Offline
Joined: 07/10/2015 - 04:15

Hi brian,
I tried your script but I am stuck. How do I define the database for the extractions ? ^^
I will make another post for the field names, I have more questions.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

You can use something like this to get the filename.  IDEAScript has a function called Client.CommonDialogs that allows you to access the common dailogs, this code will access the file explorer and return the filename that the user has selected.  In this case the variable filename will hold the name of the selected file.

Sub Main

 ' Declare variables and objects.
 Dim filename As String
 Dim obj As Object
 
 ' Access the CommomDialogs object
 Set obj = Client.CommonDialogs
 
 ' Open the File Explorer dialog box.
 filename = obj.FileExplorer()
 
 ' Display the selected file name.
 MsgBox filename
 
 ' Open the selected database.
 Client.OpenDatabase(filename)
 
 ' Clear the memory.
 Set obj = Nothing

End Sub

Pages