andrewb90
Well-known Member
- Joined
- Dec 16, 2009
- Messages
- 1,077
Hello all,
I am trying to export data from a sheet, but when I do, it creates a txt file and renames my workbook the same thing. I just need to have the text file created.
Also, I am trying to just have the file saved in the same folder as the workbook (whatever that may be). And I am trying to use I24 as the filename instead of having the option to type in the name.
Any help in fixing this would be greatly appreciated.
I am trying to export data from a sheet, but when I do, it creates a txt file and renames my workbook the same thing. I just need to have the text file created.
Code:
Sub export()
'
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:="C:\Users\AB\Documents\cellvaluename.txt", _
FileFormat:=xlUnicodeText, CreateBackup:=False
Range("I24").Select
Application.WindowState = xlMinimized
Application.WindowState = xlNormal
Range("F23").Select
End Sub
Also, I am trying to just have the file saved in the same folder as the workbook (whatever that may be). And I am trying to use I24 as the filename instead of having the option to type in the name.
Any help in fixing this would be greatly appreciated.