Function OnClick(ByRef ClickData)
Set f = clickData.func.sourcetab.selected_dirs(0)
'msgbox f
Dir(f)
End Function
This code snippet on a button sets a variable f as the selected directory, and it works fine
But when I try to use the Dir command with f as the directory for the command to use I get the dreaded "Type Mismatch"
Even if I type in the directory name between quotes I still get the "Type Mismatch"
Any of you VB gurus any ideas? How can I return the filename of the first file in the directory? Surely that is what the Dir command is for.