Solved

Folder Item , ShellFolderView

Posted on 2001-06-13
11
878 Views
Last Modified: 2008-03-17
I am not a VB expert and I just can't get this thing to work.
In html you can use :
<input type="file">

all I'm trying to do is this exact thing.

My code so far for this part is :

Private Sub b_browse_Click()
Dim browseForFiles As New ShellFolderView
Dim pfi As FolderItem
Dim fileReturnName As String
fileReturnName = browseForFiles.PopupItemMenu(pfi)
End Sub


the popupItemMenu returns an error , and I just can't understand why.
My idea is that I need to do something with the pfi (set a folder) but I can't understand how.

0
Comment
Question by:avner
  • 6
  • 2
  • 2
  • +1
11 Comments
 
LVL 1

Expert Comment

by:wgilster
ID: 6187328
Which tlbs or dlls are you referencing to give you the ShellFolderView object?
0
 
LVL 14

Author Comment

by:avner
ID: 6187339
I just found the answer.

Instead of using :

Dim browseForFiles As New ShellFolderView

I'm using :
Dim myShell As New Shell
Dim FoldItem As FolderItem
Dim l1 As Long
Dim l2 As Long
Set FoldItem = myShell.BrowseForFolder(l1, "Select Folder", l2)



And it works..

I'll leave the question open because I know I'll have a different question in a few momments.
0
 
LVL 14

Author Comment

by:avner
ID: 6187351
As I thought it dosen't work.

the code is :
Dim myShell As New Shell
Dim FoldItem As FolderItem
Dim l1 As Long
Dim l2 As Long
FoldItem = myShell.BrowseForFolder(l1, "Select Folder", l2)


It opens the GUI as I want , but when I close it (and the return thing get to work) I get an Error.

I have a reference to "Microtosft Shell control and automation"
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 50 total points
ID: 6187433
Try:
set FoldItem = myShell.BrowseForFolder(l1, "Select Folder", l2)


0
 
LVL 14

Author Comment

by:avner
ID: 6187443
Solved the problem .

Thanks.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6187462
In that case, you could delete this one, and post another, with the relevant title, so that more experts, could help you.

Cheers.
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6187469
sorry, just its all the posting/accepting delay/speed issues. ignore the message.
0
 
LVL 14

Author Comment

by:avner
ID: 6187472
The complexity of deleting a question , creating a new one and then accepting an answer dosen't worth it.

My opinion.
0
 
LVL 14

Author Comment

by:avner
ID: 6187480
I'll ignore it now :)
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6187636
I'm going crazy!
Avner, are you editing this question along way?
0
 
LVL 14

Author Comment

by:avner
ID: 6187821
I Swear god I didn't !
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now