Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
I'm trying to write a macro that will open and save a file from a lan drive that may have different drive letters depending on what each person wanted? I've been susessful in getting a file to open with my current mapped drive but i won't work if other people use it. MyFile = Dir$("G:\Daily\Report *.xls*") Do While MyFile < "" DirectoryListArray(Counter) = MyFile MyFile = Dir$ Counter = Counter + 1 Loop ReDim Preserve DirectoryListArray(Counter - 1) Thanks for any help, Josh |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Try some code like the following: Sub AAA() Dim ServerName As String Dim ShareName As String Dim FileName As String Dim FullFileName As String ServerName = "\\Altamira" ShareName = "\Transfer" FileName = Dir(ServerName & ShareName & "\*.*") Do Until FileName = vbNullString FullFileName = ServerName & ShareName & "\" & FileName Debug.Print FullFileName FileName = Dir() Loop End Sub Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Fri, 25 Sep 2009 09:48:01 -0700, jxbeeman wrote: Hi, I'm trying to write a macro that will open and save a file from a lan drive that may have different drive letters depending on what each person wanted? I've been susessful in getting a file to open with my current mapped drive but i won't work if other people use it. MyFile = Dir$("G:\Daily\Report *.xls*") Do While MyFile < "" DirectoryListArray(Counter) = MyFile MyFile = Dir$ Counter = Counter + 1 Loop ReDim Preserve DirectoryListArray(Counter - 1) Thanks for any help, Josh |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I save all open excel files? | Excel Discussion (Misc queries) | |||
Fix for open/save files problem | Excel Discussion (Misc queries) | |||
How do i save all open files in excel at once? | Excel Discussion (Misc queries) | |||
saving files with mapped drives | Excel Discussion (Misc queries) | |||
Excel files on local drives running from internet | Excel Worksheet Functions |