+ Reply to Thread
Results 1 to 4 of 4

Excel cells to notepad (2)

  1. #1
    Registered User
    Join Date
    08-29-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    41

    Excel cells to notepad (2)

    Hi everybody

    Basically I want to copy the contents in cells B2 and C2 and paste them into a notepad (.txt) automatically with A2 as the title? And the notepads can be found in the same folder as the excel sheet.

    Neil_ has kindly provided a code that works perfectly.

    Please Login or Register  to view this content.
    If the contents in cell B2 and C2 have line breaks, is it possible to edit/change the macro so that it can copy the contents (same format) and paste into notepad as shown below.

    Excel.PNG Aries.PNG

    Thank you for reading this and will appreciate if someone will be able to assist.

    Thanks and warmest regards,
    fantasylo
    Attached Files Attached Files

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Excel cells to notepad (2)

    Of course Notepad is only useful if you just want to open the file after each one is created. I guess you mean get the path from the activeworkbook or thiswookbook as sheets have no path. Then all you needed is Replace().
    e.g.
    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Excel cells to notepad (2)

    For what it's worth, a little shorter version on Ken's excellent answer.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    08-29-2016
    Location
    Singapore
    MS-Off Ver
    2007
    Posts
    41

    Re: Excel cells to notepad (2)

    Hi Kenneth and AlphaFrog

    I had tried the codes and it works!!!

    Thank you so much for your time and help!

    Have a nice day!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel cells to notepad
    By fantasylo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-31-2016, 11:22 AM
  2. [SOLVED] Macro-Launch Notepad from Excel and save data in notepad and save with naming conventio
    By hjaspaul in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-01-2016, 09:19 PM
  3. [SOLVED] Save Notepad through VBA Macro, having Copied Range of Cells, Pasted into notepad
    By analystbank in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-22-2014, 02:14 AM
  4. [SOLVED] Notepad to excel and back to notepad
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-27-2014, 10:33 AM
  5. Replies: 1
    Last Post: 01-14-2014, 04:18 PM
  6. Replies: 3
    Last Post: 08-09-2012, 04:38 PM
  7. Write cells from excel cells to notepad files
    By pacman76 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2010, 08:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1