Getopenfilename Default File Path Example
In Windows we can use for example GetOpenFilename to select files and do what we want with the path results, you can use filefilter to only display the files you. Time Life Classic Soft Rock Rapidshare Movies. Is Mac Excel 2011 If OneFile = True Then MyScript = _ 'set theFile to (choose file of type' & _ ' ' & FileFormat & ' ' & _ 'with prompt 'Please select a file' default.
I would like to use the GetOpenFilename method to open up to 100 files in a shared folder. It seems that I need to change the drive to make it work but I can't get the syntax right.
The shared folder was created on a PC named 'PC1' and the shared folder name is 'PC1-DATA'. ChDrive 'shared pc name' or ChDrive 'shared pc name' doesn't work. Strangely ChDrive 'Server name:shared pc name' doesn't generate an error message but this still returns the default path on the local machine.
I expected this code to work but it doesn't like the ChDrive 'PC1'. All Mafia 2 Playboy Download there. Kevin, I tried that also but it didn't work. I believe this is because the share is in network neighborhood and not a mapped drive. Maybe my syntax was wrong.
What I did on the remote PC named PC1 was turn on sharing for drive C and tried the following in my VBA code from another PC on our network: ChDrive 'PC1C'; ChDrive 'PC1C:'; ChDrive 'PC1:C' - None of these worked Do you know if I have to use the 'shared pc nameshared drive' syntax or simply the 'shared drive' syntax? I'll give this share another name (like X) that does'nt correspond to any other drive that may exist & try again. John, I don't think you need to change drive or directory as the full path is included in the filename returned by the getopenfilename method. I have a small PC-network at home and tried the following code to open workbooks on other PCs with success: Option Explicit Public FileName Sub OpenFilesOnNetworkDrive() Dim i As Integer Dim Filt Dim FiltIndex Dim Title Title = 'Select files' Filt = 'Excel files (*.xls), *.xls,' & 'Text files (*.txt), *.txt' FiltIndex = 1 FileName = Application.GetOpenFilename(FileFilter:=Filt, FilterIndex:=FiltIndex, _ Title:=Title, MultiSelect:=True) For i = 1 To UBound(FileName) Workbooks.Open FileName:=FileName(i) Next i End Sub. Hans, The problem that I have resides with the end users. They are not that savvy & they must decide from various files which ones they need to open. What I'm trying to do is have the GetOpenFilename dialog box startup in the correct directory (hence the ChDRive & ChDir) instead of them navigating from their default directory through network neighborhood & then to the shared folder on the PC they wish to connect with.
Any thoughts on what I'm doing wrong (or missing) would be greatly appreciated. Thanks again! John, I tried the ChDir and it works for me. I leave out the last backslash in the string containing the path.
Option Explicit Public FileName Sub OpenFilesOnNetworkDrive() Dim i As Integer Dim Filt Dim FiltIndex Dim Title Title = 'Select files' Filt = 'Excel files (*.xls), *.xls,' & 'Text files (*.txt), *.txt' FiltIndex = 1 ChDir 'Serverserver_cMy Documents' FileName = Application.GetOpenFilename(FileFilter:=Filt, _ FilterIndex:=FiltIndex, Title:=Title, MultiSelect:=True) If Not IsArray(FileName) Then Exit Sub For i = 1 To UBound(FileName) Workbooks.Open FileName:=FileName(i) Next i End Sub. Acad 2006 Keygen Crack Serial Number.