+ Reply to Thread
Results 1 to 13 of 13

VBA code to created Notepad follow by the cell value

  1. #1
    Registered User
    Join Date
    09-28-2020
    Location
    singapore
    MS-Off Ver
    2008
    Posts
    64

    VBA code to created Notepad follow by the cell value

    Hi All


    I need a VBA code to create the notepad text followed by the cell value to continue and save at the desktop.
    some of the text at notepad will remain the same only some will changes
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VBA code to created Notepad follow by the cell value

    Show real txt file structure without your comments. You have something like this, for example:

    "303T0112 (Item Code Change here)

    There is a starting quotation mark here, then there is data from the xls file ("Item Code" column) and then there is your comment instead of an ending quotation mark (?)

  3. #3
    Registered User
    Join Date
    09-28-2020
    Location
    singapore
    MS-Off Ver
    2008
    Posts
    64

    Re: VBA code to created Notepad follow by the cell value

    Hi all

    The actual file is attached herewith.
    The Bracket is only ( comment )
    Attached Files Attached Files
    Last edited by KCTOH; 11-16-2021 at 06:34 AM.

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VBA code to created Notepad follow by the cell value

    There are no quotation marks at the end, e.g.:
    "303T0112
    "W2L2 60
    etc.
    Is it supposed to be like that or is this an oversight ?

  5. #5
    Registered User
    Join Date
    09-28-2020
    Location
    singapore
    MS-Off Ver
    2008
    Posts
    64

    Re: VBA code to created Notepad follow by the cell value

    Quote Originally Posted by mjr veverka View Post
    There are no quotation marks at the end, e.g.:
    "303T0112
    "W2L2 60
    etc.
    Is it supposed to be like that or is this an oversight?
    This is not an oversight, when I finish recording Marco, the Actual file.txt‎ Is supposed to be like that.

  6. #6
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VBA code to created Notepad follow by the cell value

    : ( ... so try this:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-28-2020
    Location
    singapore
    MS-Off Ver
    2008
    Posts
    64

    Re: VBA code to created Notepad follow by the cell value

    Hi Veverka

    With .Sheets(shnme).Range("A1").CurrentRegion

    unable to get the current region property of the range class

  8. #8
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VBA code to created Notepad follow by the cell value

    What (layout, names, ...) have you changed in the file "Book1.xlsm" in relation to the original placed file in the entry/post #1 ?

  9. #9
    Registered User
    Join Date
    09-28-2020
    Location
    singapore
    MS-Off Ver
    2008
    Posts
    64
    Quote Originally Posted by mjr veverka View Post
    What (layout, names, ...) have you changed in the file "Book1.xlsm" in relation to the original placed file in the entry/post #1 ?
    workbook= Book1
    Sheet1

  10. #10
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VBA code to created Notepad follow by the cell value

    If you haven't changed anything, I can't help it, everything works fine for me.

  11. #11
    Registered User
    Join Date
    09-28-2020
    Location
    singapore
    MS-Off Ver
    2008
    Posts
    64
    Quote Originally Posted by mjr veverka View Post
    If you haven't changed anything, I can't help it, everything works fine for me.
    Would you attach the file for me thanks

  12. #12
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: VBA code to created Notepad follow by the cell value



    This is the file from post #1.

  13. #13
    Registered User
    Join Date
    09-28-2020
    Location
    singapore
    MS-Off Ver
    2008
    Posts
    64

    Re: VBA code to created Notepad follow by the cell value

    Thanks, mjr veverka.

+ 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. Automatically open *.txt file created by macro in Notepad
    By MagicMan in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-27-2020, 01:11 PM
  2. VBA code to follow hyperlink doesn't work when cell contains formula
    By PFDave in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2016, 04:19 AM
  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. Opening Notepad a saved notepad file and copying the data on it
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2014, 06:18 PM
  5. Remove marching ants after notepad macro opens notepad
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 01-07-2014, 09:47 PM
  6. how to copy selected notepad text and paste it in other notepad with macro
    By Guru232 in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 04-24-2013, 04:43 AM
  7. Replies: 11
    Last Post: 12-24-2012, 03:41 PM

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