Solved

Folder Item , ShellFolderView

Posted on 2001-06-13
11
887 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
ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON Response and request in VB6 application 11 418
vb6 connector to mongodb 2 83
MS SQL store procedure to calculate and return result 6 58
RUNRMTCMD from AS/400 12 47
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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

770 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