hi everybody.
i will try to explain mij problem.
I'm working with 1 excel sheet... where buttons link me through to folders.
the sheet is used by several users, each with there one workspace.
if 1 users clicks a button, they have fill in a password, when password correct, there needs to come a list of folders where they can select the folder they need to work in.
In each folder there is an excel workfile.
Can somebody help me out, or is this not possible??
This is the code I'm using. it works fine but when the file list opens a can open underlying folders which is not what i want.
[VBA] PW = InputBox("Geef het Paswoord aub !", , "*************")
If PW = "" Then Exit Sub
If PW <> "jackson" Then
MsgBox "Verkeerd Wachtwoord."
Exit Sub
End If
Dim Filter As String, Title As String, msg As String
Dim i As Integer, FilterIndex As Integer
Dim Filename As Variant
' File filters
Filter = "Excel Files (*.xls),*.xls," & _
"Text Files (*.txt),*.txt," & _
"All Files (*.*),*.*"
' Default filter to *.*
FilterIndex = 3
' Set Dialog Caption
Title = "Select File(s) to Open"
' Select Start Drive & Path
ChDrive ("C")
ChDir ("C:\Documents and Settings\jschulpen\Bureaublad\projectberstanden\Office")
With Application
' Set File Name Array to selected Files (allow multiple)
Filename = .GetOpenFilename(Fiter, FilterIndex, Title, , True)
' Reset Start Drive/Path
ChDrive (Left(.DefaultFilePath, 0))
ChDir (.DefaultFilePath)
End With
' Exit on Cancel
If Not IsArray(Filename) Then
MsgBox "No file was selected."
Exit Sub
End If
' Open FilesFor
i = LBound(Filename)
msg = msg & Filename(i) & vbCrLf
' This can be removed
Workbooks.Open Filename(i)
MsgBox msg, vbInformation, "Files Opened" ' This can be removedEnd Sub
End Sub[/VBA]