• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to get desired text in open dialogue box

Hi All,

Please help in making a dialouge box where i could get my desired text instead of open in open dialouge box. please find the attached image where i have tried to explore my words.

instead of open there should be like this "open september mid day collection file"

Hope it is undestandable.
 

Attachments

  • untitled.JPG
    untitled.JPG
    114.6 KB · Views: 4
Code:
Sub UseFileDialogOpen()

  Dim lngCount As Long

  ' Open the file dialog
  With Application.FileDialog(msoFileDialogOpen)
  .AllowMultiSelect = True
  .Title = "Open September mid day collection file"
  .Show
   
  ' Display paths of each file selected
  For lngCount = 1 To .SelectedItems.Count
  MsgBox .SelectedItems(lngCount)
  Next lngCount

  End With

End Sub
 
Thanks Hui for kind revert i tried it out and able to get the name at title and also selected multi file but they are not opening. i am getting msg box with full path of file bu files are not opening.
 
Code:
Sub OpenFile()
FileToOpen = Application.GetOpenFilename _
  (Title:="Open September mid day collection file", _
  FileFilter:="Excel Files *.xls (*.xls),")

If FileToOpen = False Then
  MsgBox "No file specified.", vbExclamation, "Whoops"
  Exit Sub
Else
  Workbooks.Open Filename:=FileToOpen
End If

End Sub
 
Back
Top