+ Reply to Thread
Results 1 to 25 of 25

Remove marching ants after notepad macro opens notepad

  1. #1
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Remove marching ants after notepad macro opens notepad

    So In this macro,

    it post whatever is in cell A1 into a notepad...

    I have two questions...

    1. How do I have it so that the marching ants don't appear after the contents of cell A1 are posted into the notepad.?

    2. Once the contents are posted into the notepad, Is there a way to have excel copy what's in the notepad?
    Or is that pretty much the limit (as in once its out of excel into the notepad...)

    see attachment
    Attached Files Attached Files

  2. #2
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,067

    Re: Remove marching ants after notepad macro opens notepad

    Hi swade730,

    I assume you mean the 'Marquee' when you say 'Marching Ants'?

    You can Save the workbook to stop them 'Marching'

    Cheers
    Remember you are unique, like everyone else

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove marching ants after notepad macro opens notepad

    Hello swade730,

    Another way is to use the statement below after you pasted the data.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    Quote Originally Posted by noboffinme View Post
    Hi swade730,

    I assume you mean the 'Marquee' when you say 'Marching Ants'?

    You can Save the workbook to stop them 'Marching'

    Cheers
    Yes, I think marching ants sounds cooler though

    -Thanks

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Remove marching ants after notepad macro opens notepad

    swade730;
    I'm with you. Look at this link http://spreadsheets.about.com/od/m/g/ants_def.htm
    BTW: I use Leith's solution regularly.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  6. #6
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    Please Login or Register  to view this content.
    Does not solve the issue...
    Last edited by swade730; 12-17-2013 at 07:25 PM.

  7. #7
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    Quote Originally Posted by alansidman View Post
    swade730;
    I'm with you. Look at this link http://spreadsheets.about.com/od/m/g/ants_def.htm
    BTW: I use Leith's solution regularly.
    Hahaha, Nice!

    Leith's solution to apply
    Please Login or Register  to view this content.
    Does not work in this scenario.

  8. #8
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    Quote Originally Posted by noboffinme View Post
    Hi swade730,

    I assume you mean the 'Marquee' when you say 'Marching Ants'?

    You can Save the workbook to stop them 'Marching'

    Cheers
    I've tried this as well. When you save the workbook, NOTHING gets pasted to the notepad! A trade-Off I can't afford...


    Any other insight/workaround?

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Remove marching ants after notepad macro opens notepad

    Please Login or Register  to view this content.
    works for me
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove marching ants after notepad macro opens notepad

    Hello swade730,

    This is your code with a couple of changes: Added TRUE to SendKeys and included Application.CutCopyMode = False.

    Adding True to SendKeys makes SendKeys wait until the active window has received the information before returning back to VBA. If you don't do this then VBA may clear the clipboard (that's what Application.CutCopyMode = false does) before the data is transferred to NotePad.
    Please Login or Register  to view this content.
    You should also explain more about what you want to do. Retrieving the data from Notepad is possible. Before I or anyone can help you with this, you need to provide clear details of what you want to do.

  11. #11
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    Quote Originally Posted by Leith Ross View Post
    Hello swade730,

    This is your code with a couple of changes: Added TRUE to SendKeys and included Application.CutCopyMode = False.

    Adding True to SendKeys makes SendKeys wait until the active window has received the information before returning back to VBA. If you don't do this then VBA may clear the clipboard (that's what Application.CutCopyMode = false does) before the data is transferred to NotePad.
    Please Login or Register  to view this content.
    You should also explain more about what you want to do. Retrieving the data from Notepad is possible. Before I or anyone can help you with this, you need to provide clear details of what you want to do.

    Thank You So much for the explanation...

    The goal is to basically make it easier for me to copy from notepad the information I am pulling from the respective cell in excel.

    If VBA pastes it to the notepad...I then have to go highlight it in the notepad...

    It would boggle my mind if Once pasted to the notepad, I can have it so that it's highlighted and copied already from the notepad,
    (Avoiding having to do this manually with my mouse).



    So essentially from the macro, I am just pasting what ever went to the notepad...to my destination.

  12. #12
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove marching ants after notepad macro opens notepad

    Hello swade730,

    Copy the code below and paste it into a new VBA module in your workbook. Call the macro CopyNotepadToClipboard to copy ALL of Notepad to the clipboard.
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor noboffinme's Avatar
    Join Date
    08-29-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003/7/10/13/16/19
    Posts
    1,067

    Re: Remove marching ants after notepad macro opens notepad

    Hi swade730,

    The 'save' needs to happen after the paste has occurred.

    & yeah, Marching Ants is cooler than Marquee ...

  14. #14
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Remove marching ants after notepad macro opens notepad

    Leith Ross,
    The API functions in your code do not relate to Windows Vista or later - the PtrSafe attribute requires VBA7 or later, so Office 2010 and forward. The Windows version does not in fact matter.

  15. #15
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    Quote Originally Posted by Leith Ross View Post
    Hello swade730,

    Copy the code below and paste it into a new VBA module in your workbook. Call the macro CopyNotepadToClipboard to copy ALL of Notepad to the clipboard.
    Please Login or Register  to view this content.

    Thank You sooo much. Sorry for the late response. I do appreciate this code.
    Thank You!

  16. #16
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove marching ants after notepad macro opens notepad

    Hello swade730,

    You're welcome. Glad I could help out.

    Nollaig chridheil!

    (Scottish for "Merry Christams!")

  17. #17
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Remove marching ants after notepad macro opens notepad

    and there's me thinking Scottish for merry xmas was ...HIC!

  18. #18
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove marching ants after notepad macro opens notepad

    @ Martin,

    Slàinte!

  19. #19
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,601

    Re: Remove marching ants after notepad macro opens notepad

    Please Login or Register  to view this content.
    Ben Van Johnson

  20. #20
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    Quote Originally Posted by Leith Ross View Post
    Hello swade730,

    You're welcome. Glad I could help out.

    Nollaig chridheil!

    (Scottish for "Merry Christmas!")
    Merry Christmas...

    one Last Question... What version of Excel is this good for again?

    It works for but not for prior...

  21. #21
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove marching ants after notepad macro opens notepad

    Hello swade730,

    This will work work with Win 7 and later. If you need this to run on an earlier version, let me know.

  22. #22
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    What would be the code to run this on a earlier version?

  23. #23
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove marching ants after notepad macro opens notepad

    Hello swade730,

    Here is the code for computers running VBA5 or VBA6.
    Please Login or Register  to view this content.

  24. #24
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Remove marching ants after notepad macro opens notepad

    Quote Originally Posted by Leith Ross View Post
    Hello swade730,

    Here is the code for computers running VBA5 or VBA6.
    Please Login or Register  to view this content.
    Thank you, I will try and apply it and I will let you know how it goes... I really really appreciate it

  25. #25
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove marching ants after notepad macro opens notepad

    Hello swade730,

    You're welcome. Hopefully everything will work with no problem.

    Bliadhna mhath ùr!
    (Happy New Year!)

+ 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] Remove 'marching ants' from copied cell
    By staggers47 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-14-2017, 12:26 AM
  2. remove double quote marks when pasting into notepad
    By frantan in forum Excel General
    Replies: 6
    Last Post: 02-06-2014, 03:49 PM
  3. 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
  4. [SOLVED] Excel should include flashing cells/block and marching ants like W
    By waholt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2005, 02:05 PM
  5. Marching ants
    By news.microsoft.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2005, 02:05 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