christian2016
Board Regular
- Joined
- Oct 6, 2016
- Messages
- 123
Hi Guys,
Need help with a VBA code to save to directory if found.
Saving bit I know how to do it's just finding the sub-folder in a directory path is the bit im having trouble with.
Example:
G:\Test\New\Folder
In this directory you will have folders
1 Jan
2 Feb
3 Mar
4 Apr
5 May
6 Jun (etc)
What I need the VBA code to do.
Depending on what today's current month is I need the VBA code to find the correct month sub folder.
Today its the month of November so directory save path should be
G:\Test\New\Folder\11 Nov
Also The drive letter path is a variable as the user can set it to what they like, so I need the VBA code to also check all letters of drive paths from A-Z to try find a directory path match.
A:\Test\New\Folder\11 Nov
B:\Test\New\Folder\11 Nov
C:\Test\New\Folder\11 Nov (etc.)
If path is found then save file and do what you want it to do if not found a msgbox "directory path not found"
I hope this makes sense and is possible.
Any help is greatly appreciated
Thnaks
Need help with a VBA code to save to directory if found.
Saving bit I know how to do it's just finding the sub-folder in a directory path is the bit im having trouble with.
Example:
G:\Test\New\Folder
In this directory you will have folders
1 Jan
2 Feb
3 Mar
4 Apr
5 May
6 Jun (etc)
What I need the VBA code to do.
Depending on what today's current month is I need the VBA code to find the correct month sub folder.
Today its the month of November so directory save path should be
G:\Test\New\Folder\11 Nov
Also The drive letter path is a variable as the user can set it to what they like, so I need the VBA code to also check all letters of drive paths from A-Z to try find a directory path match.
A:\Test\New\Folder\11 Nov
B:\Test\New\Folder\11 Nov
C:\Test\New\Folder\11 Nov (etc.)
If path is found then save file and do what you want it to do if not found a msgbox "directory path not found"
I hope this makes sense and is possible.
Any help is greatly appreciated
Thnaks