VBA Macro to Copy From Excel and Paste to Notepad

Sub Filter_Copy_and_Paste_to_NotePad()
'Sets Filter
     Range("A2:V2").Select
     Selection.AutoFilter

     Range("A2").Select
     ActiveSheet.Range("$2:$500").AutoFilter Field:=1, Criteria1:="Upload"
'Finds column to copy
    Cells.Find(What:= _
       
"Item_to_Find", _
        After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:= _
       
xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False) _
        .Activate
                Range(Selection, Selection.End(xlDown)).Select
               
Selection.Copy
'Copies data and opens notepad
Shell "notepad.exe", vbMaximizedFocus 

SendKeys "^v"         'this pastes to notepad 
SendKeys "^h"         'this opens the "Replace" feature 
SendKeys """"           'this inputs quotations in the "find what"
SendKeys "%a"         'this strikes the "Replace All" button
SendKeys "%{F4}"    'this closes the "Replace" feature
SendKeys "^s"         'this tries to "Save" your document, so it prompts you to name it
End Sub


Comments

No comments yet
*Name:
Email:
Notify me about new comments on this page
Hide my email
*Text:
 
 
Comments Powered by: Scriptsmill Comments Script
Web designed by: Jose Guevara Balboa © 2015Comments Admin