I hope someone can help
i have a problem in that there is a folder created auitomatically everynight with a number of txt files, what i need to be able to do is rename these files using VBA.
I have the following code that i thought would work
Dim oApp As Object
Dim FilePath As String, Draft As String, FinalFilePath As String
FilePath = "H:\Retail Network\Private\GMS Call Centre\Call Centre\MiDatabases\BranchTelephony\Work In Progress\OutboundData\"
Draft = "Branch_report" & "*"
FinalFilePath = FilePath & Draft
If Dir(FilePath & Draft, vbNormal) <> "" Then
Name FinalFilePath As "H:\Retail Network\Private\GMS Call Centre\Call Centre\MiDatabases\BranchTelephony\Work In Progress\OutboundData\BranchReport230408.txt"
Else
MsgBox "The file selected Does Not Exist", vbExclamation, "File Does Not Exist"
End If
however i have since realised that you can not use wildcard with the name function and was hoping someone could help me with the best way to achieve theis
i have a problem in that there is a folder created auitomatically everynight with a number of txt files, what i need to be able to do is rename these files using VBA.
I have the following code that i thought would work
Dim oApp As Object
Dim FilePath As String, Draft As String, FinalFilePath As String
FilePath = "H:\Retail Network\Private\GMS Call Centre\Call Centre\MiDatabases\BranchTelephony\Work In Progress\OutboundData\"
Draft = "Branch_report" & "*"
FinalFilePath = FilePath & Draft
If Dir(FilePath & Draft, vbNormal) <> "" Then
Name FinalFilePath As "H:\Retail Network\Private\GMS Call Centre\Call Centre\MiDatabases\BranchTelephony\Work In Progress\OutboundData\BranchReport230408.txt"
Else
MsgBox "The file selected Does Not Exist", vbExclamation, "File Does Not Exist"
End If
however i have since realised that you can not use wildcard with the name function and was hoping someone could help me with the best way to achieve theis