Solved

Folder Item , ShellFolderView

Posted on 2001-06-13
11
874 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

757 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

20 Experts available now in Live!

Get 1:1 Help Now