i want to make a button wich will give me link of that folder from Windows tree, wich i chose.............
Sorry for my English:))

Recommended Answers

All 4 Replies

I take it you are using the DriveListBox, DirListBox, and FileListBox, well maybe not the FileListBox but with the DriveListBox it is as simple as this...

Private Sub Command1_Click()
MsgBox Dir1.Path
End Sub

Good Luck

hi, tanks vor help, bat i have a code wich give mi to choose a file
public Function FileFromWindowsTree()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim OFName As OPENFILENAME
OFName.lStructSize = Len(OFName)
'Set the parent window
OFName.hwndOwner = Application.hWndAccessApp
'Set the application's instance
'OFName.hInstance =Application. app.hInstance
'Select a filter
'OFName.lpstrFilter = "Text Files (*.txt)" + Chr$(0) + "*.txt" + Chr$(0) + "All Files (*.*)" + Chr$(0) + "*.*" + Chr$(0)
OFName.lpstrFilter = "All Files (*.*)" + Chr$(0) + "*.*" + Chr$(0)
'create a buffer for the file
OFName.lpstrFile = Space$(254)
'set the maximum length of a returned file
OFName.nMaxFile = 255
'Create a buffer for the file title
OFName.lpstrFileTitle = Space$(254)
'Set the maximum length of a returned file title
OFName.nMaxFileTitle = 255
'Set the initial directory
OFName.lpstrInitialDir = "C:\"
'Set the title
OFName.lpstrTitle = "Open File"
'No flags
OFName.Flags = 0

'Show the 'Open File'-dialog
If GetOpenFileName(OFName) Then
FileFromWindowsTree = Trim$(OFName.lpstrFile)
Else
FileFromWindowsTree = ""
End If
End Function
with this i choose file, bat i wont to choose folder , where i'll save some files later....
can you help me with this??:)

thanks fo link:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.