I was initially using Send Keys within my code, which works but isn't always fully functional; occasionally, while the code is executing, some steps will be completed more quickly than others, other times it won't copy at all and will just create a blank document, and finally, it will become stuck on a blank notepad opening. I'm looking for a more comprehensive export and save option, so any assistance is greatly valued. To further ensure that each step was completed, I included DoEvents, but it didn't help either.
ub export_one_column()
Dim fdObj As Object
Application.ScreenUpdating = False
Set fdObj = CreateObject("Scripting.FileSystemObject")
If fdObj.FolderExists("C:\Call_Log") Then
Else
fdObj.CreateFolder ("C:\Call_Log")
MsgBox "Call Log Folder has been created in your C\ Folder.", vbInformation, "Creating Folder"
End If
Application.ScreenUpdating = True
Sheets("PrintTXT").Select
Columns(3).Select
Selection.Copy
Shell "notepad.exe", 3
DoEvents
SendKeys "^v"
DoEvents
SendKeys "^s"
DoEvents
SendKeys "C:\Call_Log" & "\textfile-" & Format(Now, "ddmmyy-hhmmss") & ".txt" '<<==== Change
DoEvents
SendKeys "{ENTER}"
DoEvents
SendKeys "%fx"
DoEvents
SendKeys "{NUMLOCK}", True
Sheets("ENTRY FORM").Select
End Sub