drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 559
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi and Thanks in advance
I am 90% of the time working with folder as follows;
During the last month I have received a few requests asking my to do a looping with Files shared in a folder
But some of the customers can't put this place, this Folders in their PC inside say (C; or D: )
So when they save a file in their C: the file is updated as well in the Shared place
They are working with something that comes as
I am 90% of the time working with folder as follows;
- C::\Users\My Name\...
- X:\Files\OBS\...
- E:\PendingJOBS\Year 2025\...
VBA Code:
Function Fx_bFolderExists(wPath As String) As Boolean
On Error Resume Next: Application.ScreenUpdating = False
Dim X As String: X = GetAttr(wPath) And 0
If Err = 0 Then Fx_bFolderExists = True
End Function
- From the inmediate window If I put:
- ? Fx_bFolderExists("C::\Users\My Name\")
- ? Fx_bFolderExists("C::\Users\My Name")
- ? Fx_bFolderExists("X:\Files\OBS\")
- ? Fx_bFolderExists("X:\Files\OBS")
- I will get True (in all of them because the foders are in my computer, they Exist)
- From the inmediate window If I put_
- ? Fx_bFolderExists("C::\Users\My\")
- I will get False (because this folder or Path does not exist in my PC
- ? Fx_bFolderExists("C::\Users\My\")
During the last month I have received a few requests asking my to do a looping with Files shared in a folder
- I did not have probles before
But some of the customers can't put this place, this Folders in their PC inside say (C; or D: )
So when they save a file in their C: the file is updated as well in the Shared place
They are working with something that comes as
- \\srv-dc01\SCompanyName\jobs\Files\
- \\,,,
- And check for the files inside