Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This question actually involves Microsoft Word.....
The following code works in Excel, but it gives a compile error in Word. Does anyone know why? '-------------------------------------- Public Function MyFileDlg() As String ' This line fails in Word! NewFN = Application.GetOpenFilename(FileFilter:="Text Files (*.txt), *.txt", Title:="Please select a file") If NewFN = False Then MyFileDlg = "" Else MyFileDlg = NewFN End If End Function '------------------------- Sub Tester() Dim str As String str = MyFileDlg MsgBox str End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Robert,
Am Sun, 10 May 2015 02:19:03 -0700 schrieb Robert Crandal: NewFN = Application.GetOpenFilename(FileFilter:="Text Files (*.txt), *.txt", Word does not work with GetOpenFileName. Please have a look: http://www.erlandsendata.no/english/...foldernameword P.S.: Did you see in the other thread the solution with Regular Expressions? Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.GetOpenFilename | Excel Programming | |||
Application.GetOpenFileName | Excel Programming | |||
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) | Excel Programming | |||
Application.GetOpenFilename | Excel Programming | |||
Application.GetOpenFileName | Excel Programming |