Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I let user to open his/her own file with this VBA...... Sub ConsolFile() Application.Workbooks.Open (GetFileName) End Sub Function GetFileName() 'Get a FileName (may change current drive/directory.) Filename = Application.GetOpenFilename 'Get the current directory and drive TempDir = CurDir() 'Switch back to original drive ChDrive Mid(TempDir, 1, 1) 'Switch back to the orginal directory ChDir TempDir 'Return the filename GetFileName = Filename End Function It doesn't work 'cause it return false when user cancel....How can I fix this problem? Thanks Jafery |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open Dialog Box to return Selected File Path and Not Open it. | Excel Programming | |||
Open File Dialog Box | Excel Programming | |||
File open dialog | Excel Discussion (Misc queries) | |||
File Open Dialog | Excel Programming | |||
File open dialog | Excel Programming |