Pass API dialog selection to control

  • Thread starter Thread starter John Hipskind
  • Start date Start date
J

John Hipskind

Using API001, I've been able to open the file selection
dialog from within a control.
How do I make the selected file the current value of that
field?
(I'm selecting Excel files to import)
Thanks.
John
 
That code has the following example for selecting Excel files:

Dim strFilter As String
Dim strInputFileName as string

strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)", "*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)

You just need to add a line after that:

Me!MyControl = strInputFileName

(replace MyControl with the name of your control)
 
Back
Top