sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
I'm using this to allow users to browse to a folder in order to save the file;
What I'd like to do if possible is lock or hide the title field at the bottom of the browse window - what's happening at the moment is users are getting confused and are typing a name in that field in an effort to save the file as a different name, so my theory was is I can lock or hide that title field they are forced to simply select a folder to save.
Make sense?
Code:
Function GetInstallFolder() As String
Dim fldr As FileDialog
Dim sItem As String
Dim sDesktop As String
Dim bValid As Boolean
sDesktop = Environ("USERPROFILE") & "\Desktop"
Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
Do
sItem = ""
bValid = True
With fldr
.Title = "Toolbox"
.AllowMultiSelect = False
.InitialFileName = Application.DefaultFilePath
If .Show = -1 Then sItem = .SelectedItems(1)
End With
If StrComp(Left$(sItem, Len(sDesktop)), sDesktop, vbTextCompare) = 0 Then
bValid = False
Call MsgBox("You cannot save the Toolbox on your desktop - choose another folder", vbCritical, "Unable to save")
End If
Loop Until bValid
GetInstallFolder = sItem
NewInstallFrm.TextPath.Value = sItem
Set fldr = Nothing
End Function
What I'd like to do if possible is lock or hide the title field at the bottom of the browse window - what's happening at the moment is users are getting confused and are typing a name in that field in an effort to save the file as a different name, so my theory was is I can lock or hide that title field they are forced to simply select a folder to save.
Make sense?