Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default FileDialog grey's out the View box

Hello,
I want to select one particular folder, but I need the view box to appear so
that I can sort the folders by modified date, name, etc. The "View" box is
greyed out.
Thanks for you help.

Private Sub GetFolderName()

Dim strSelectedFullFolder As String
Dim strSelectedFolder As String
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
With fd
.AllowMultiSelect = False
.InitialView = msoFileDialogViewDetails
.Show
strSelectedFullFolder = .SelectedItems(1)
strSelectedFolder = Mid(strSelectedFullFolder, 68,
Len(strSelectedFullFolder))
End With

End Sub

--
Programmer on Budget
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default FileDialog grey's out the View box

I am not sure it can be done with FileDialog object, but if you want I can
post API code that gives you much more control and that can do it.

RBS

"Budget Programmer" wrote in
message ...
Hello,
I want to select one particular folder, but I need the view box to appear
so
that I can sort the folders by modified date, name, etc. The "View" box
is
greyed out.
Thanks for you help.

Private Sub GetFolderName()

Dim strSelectedFullFolder As String
Dim strSelectedFolder As String
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
With fd
.AllowMultiSelect = False
.InitialView = msoFileDialogViewDetails
.Show
strSelectedFullFolder = .SelectedItems(1)
strSelectedFolder = Mid(strSelectedFullFolder, 68,
Len(strSelectedFullFolder))
End With

End Sub

--
Programmer on Budget


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default FileDialog grey's out the View box

A simple way (not involving API) is to do:

Set fd = Application.FileDialog(msoFileDialogOpen)

and take the folder from the produced file path.

RBS


"Budget Programmer" wrote in
message ...
Hello,
I want to select one particular folder, but I need the view box to appear
so
that I can sort the folders by modified date, name, etc. The "View" box
is
greyed out.
Thanks for you help.

Private Sub GetFolderName()

Dim strSelectedFullFolder As String
Dim strSelectedFolder As String
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
With fd
.AllowMultiSelect = False
.InitialView = msoFileDialogViewDetails
.Show
strSelectedFullFolder = .SelectedItems(1)
strSelectedFolder = Mid(strSelectedFullFolder, 68,
Len(strSelectedFullFolder))
End With

End Sub

--
Programmer on Budget


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FileDialog Mike Archer Excel Programming 0 May 28th 06 06:31 PM
using a filedialog box from a dll Paul Excel Programming 2 April 26th 06 04:56 PM
FileDialog AMDRIT Excel Programming 1 October 21st 05 10:17 PM
filedialog Norm Excel Worksheet Functions 0 July 29th 05 10:17 PM
FileDialog Jag Man Excel Programming 3 February 2nd 04 04:50 AM


All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"