|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VBA 2003 FileOpen DialogBox View DetailsDialog Box to show the user file modified dates, sizes , etc.? DialogCaption = "Select Your Meds File - " frmOpenDlg.dlgOpenFile.DialogTitle = DialogCaption ' Set the Open File dialog box to display *.doc files. frmOpenDlg.dlgOpenFile.Filter = _ "Beth Meds File (BethMed*.Doc)|BethMed*.doc" frmOpenDlg.dlgOpenFile.InitDir = _ "c:\Documents and Settings\GrandpaRay\My Documents\Meds" ' Display the File Open dialog box. frmOpenDlg.dlgOpenFile.MaxFileSize = 15000 frmOpenDlg.dlgOpenFile.FilterIndex = 1 frmOpenDlg.dlgOpenFile.Flags = cdlOFNReadOnly Or cdlOFNFileMustExist _ Or cdlOFNLongNames _ Or cdlOFNExplorer frmOpenDlg.dlgOpenFile.CancelError = True frmOpenDlg.dlgOpenFile.FileName = "" On Error Resume Next frmOpenDlg.dlgOpenFile.ShowOpen If Err <> 0 Then MsgBox "Open Dialog ERR:" & Err _ & vbCrLf & "Err.Number:" & Err.Number _ & vbCrLf & "Err.Description:" & Err.Description _ & vbCrLf & "Err.Source:" & Err.Source ' No file selected from the Open File dialog box. 'VBA.Err.Number = rCaughtErr.Number 'VBA.Err.Description = rCaughtErr.Description 'VBA.Err.Source = rCaughtErr.Source Exit Sub End If MedsFileName = Trim(frmOpenDlg.dlgOpenFile.FileName) MsgBox "Meds File Selected Is " & MedsFileName Thanks, -- Grandpa Ray "GrandpaRay" <Grandpa***@discussions.microsoft.com> wrote in message
http://vbnet.mvps.org/code/hooks/fileopensavedlghooklvview.htm
news:8AC3265C-F4F5-463D-83B7-5E3F91CED5CF@microsoft.com... > Is there a way to specify the "view details" option when opening a Common > Dialog Box to show the user file modified dates, sizes , etc.? That sample Jeff works fine in VB6 but I can't make it work in a VBA 2003
listbox control. Am I missing a reference to supply the proper listbox? -- Show quoteHide quoteGrandpa Ray "Jeff Johnson" wrote: > "GrandpaRay" <Grandpa***@discussions.microsoft.com> wrote in message > news:8AC3265C-F4F5-463D-83B7-5E3F91CED5CF@microsoft.com... > > > Is there a way to specify the "view details" option when opening a Common > > Dialog Box to show the user file modified dates, sizes , etc.? > > http://vbnet.mvps.org/code/hooks/fileopensavedlghooklvview.htm > > > "GrandpaRay" <Grandpa***@discussions.microsoft.com> wrote in message This group (and the site I sent you to) is for the standalone version of VB. news:3805EF9B-B281-4F86-8315-1E98B27A71B4@microsoft.com... > That sample Jeff works fine in VB6 but I can't make it work in a VBA 2003 > listbox control. Am I missing a reference to supply the proper listbox? VBA is very similar but there are enough differences that we generally redirect people who ask VBA questions to the groups for the product they're writing their code under (Word, Excel, etc.). Sorry I didn't notice VBA in the subject line the first time around. And more than likely you won't be able to do what you want because those programs are already hooking their Open dialogs to add stuff. But I guess it's possible. Jeff,
Thanks for the info. I have noticed that the controls in VBA tend to not be as robust as those in VB. -- Show quoteHide quoteGrandpa Ray "Jeff Johnson" wrote: > "GrandpaRay" <Grandpa***@discussions.microsoft.com> wrote in message > news:3805EF9B-B281-4F86-8315-1E98B27A71B4@microsoft.com... > > > That sample Jeff works fine in VB6 but I can't make it work in a VBA 2003 > > listbox control. Am I missing a reference to supply the proper listbox? > > This group (and the site I sent you to) is for the standalone version of VB. > VBA is very similar but there are enough differences that we generally > redirect people who ask VBA questions to the groups for the product they're > writing their code under (Word, Excel, etc.). Sorry I didn't notice VBA in > the subject line the first time around. > > And more than likely you won't be able to do what you want because those > programs are already hooking their Open dialogs to add stuff. But I guess > it's possible. > > > |
|||||||||||||||||||||||