PDA

Click to See Complete Forum and Search --> : Setting initial path for SHBrowseForFolder API in a VB class


FrankLovesFl
Apr 29th, 2001, 04:13 PM
I am using a VB code sample written by Paul Kuliniewicz at http://www.vbapi.com

It shows an example of how to call the SHBrowseForFolder API to browse fpr folders. There is an option to use SendMessage to set the initial path before calling the dialog. It works in a module but fails when implemented as a class.

The code that fails is:
' define the callback function that passes the initial directory
BInfo.lpfnCallback = DummyFunc(AddressOf BrowseCallbackProc)

The error is 'Compile error: Invalid use of AddressOf operator.

Any suggestions?