OaklandJim
Well-known Member
- Joined
- Nov 29, 2018
- Messages
- 833
- Office Version
- 365
- Platform
- Windows
I have an open .txt file. I know where it is (path). How do I close it?
VBA Code:
Dim sPath as string
Dim sFileName as string
sPath = "C:\Users\Bob\Desktop\"
sFileName = "Test.txt"
Application.DisplayAlerts = False
Close sPath & sFileName