A
avkokin
Hello.
There is the code which opens dialog box (below).
Why I can't apply the property "InitialView = msoFileDialogViewList"
for dialog box? Let that primary the dialog had the initial
presentation as "msoFileDialogViewProperties". But after start this
macro the initial presentation don't change. Why?
Sub openDlg()
Dim fd As FileDialog
Dim regPath As String
Dim myPath As String
Dim keyValue As String
Set fd = Application.FileDialog(msoFileDialogOpen)
regPath = "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common
\General"
keyValue = System.PrivateProfileString("", regPath, "RecentFiles")
myPath = Environ("APPDATA") & "\Microsoft\Office\" & keyValue & "\"
With fd
.InitialFileName = myPath
.AllowMultiSelect = False
.Filters.Add "Documents Word:", "*.doc; *.rtf; *.dot; *.docx"
.FilterIndex = 9
.Title = keyValue
.InitialView = msoFileDialogViewList 'here is problem ???
If .Show = -1 Then
.Execute
End If
End With
Set fd = Nothing
End Sub
There is the code which opens dialog box (below).
Why I can't apply the property "InitialView = msoFileDialogViewList"
for dialog box? Let that primary the dialog had the initial
presentation as "msoFileDialogViewProperties". But after start this
macro the initial presentation don't change. Why?
Sub openDlg()
Dim fd As FileDialog
Dim regPath As String
Dim myPath As String
Dim keyValue As String
Set fd = Application.FileDialog(msoFileDialogOpen)
regPath = "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common
\General"
keyValue = System.PrivateProfileString("", regPath, "RecentFiles")
myPath = Environ("APPDATA") & "\Microsoft\Office\" & keyValue & "\"
With fd
.InitialFileName = myPath
.AllowMultiSelect = False
.Filters.Add "Documents Word:", "*.doc; *.rtf; *.dot; *.docx"
.FilterIndex = 9
.Title = keyValue
.InitialView = msoFileDialogViewList 'here is problem ???
If .Show = -1 Then
.Execute
End If
End With
Set fd = Nothing
End Sub