Solved

Folder Item , ShellFolderView

Posted on 2001-06-13
11
908 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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
 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

691 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