• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Convert/Save As into .txt format

Hi All,

Is their any possibility to copy and paste an excel result into .txt format to a specific location?

Actually, there are a lot of forumulas/formatting (macro) before final result. After applying all the formulas, i will get a sheet of data. Now I am doing manually copy and paste this result into a notepad. Is there any way to include this step also in the macro?
 
Dear Vipin,

It can possible by VBA. But can you please upload a sample file along with one example. So that other members can resolve your problem as soon as possible
 
Dear Vipin,

It can possible by VBA. But can you please upload a sample file along with one example. So that other members can resolve your problem as soon as possible

Sorry, Actually I am using this in my office system, due to the privacy policy, i am not able to upload any file.
 
Can you create dummy file with same structure ? You told that you are manually copy and paste it in notepad to save it as text file. How much range you are copying and what are the contents. Please let me know
 
Use [CODE=vb] & [/CODE] tags to embed your VBA Macros
Dear vipin,

I don't know what is your structure, but i just created a dummy data and save it as text file. Please have look on below macro

Code:
Sub CreateText()
  Range("A1").CurrentRegion.Copy
  Application.Workbooks.Add
  Worksheets.Add
  ActiveSheet.Paste
  ActiveWorkbook.SaveAs "C:\users\vijay kumar\desktop\test1", xlText, , , , False
  ActiveWorkbook.Close False

End Sub
 
Last edited by a moderator:
Back
Top