Jump to content

Object for searching a file


b0x
 Share

Recommended Posts

You're trying to interact with the COM control in a non-COM manner. You need to continue using COM methods and properties in order to get what you want out of the FileSelect class. I have never used the Program Compatibility Controls, though, so I can't help you with the specifics. But I do have a question. I'm not sure I understand why you're using this approach to create a file selection control, though. Why not just use common controls like an input box, button, and label, and hook them together with a FileOpenDialog()?

Something like this, triggered by a button or something:

$var = FileOpenDialog($message, @WindowsDir & "\", "Images (*.jpg;*.bmp)", 1 + 4 )

If @error Then
    MsgBox(4096,"","No File(s) chosen")
Else
    $var = StringReplace($var, "|", @CRLF)
    MsgBox(4096,"","You chose " & $var)
EndIf

-S

(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...