Results 1 to 7 of 7

vba code question in excel to manipulate notepad document

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    957

    vba code question in excel to manipulate notepad document

    I'm using the following code to copy columns of data in a worksheet of mine. The code once activated will open "notepad" and copy the columns of data in my excel worksheet. Here is the code:
    Sub notepad()
        'The  range that contains the values
        Range("A3:H2000").Copy
        'Start Notepad And let it recieve focus
        Shell "notepad.exe", vbNormalFocus
        'Send the keys CTRL+V To Notepad (i.e the window that has focus)
        SendKeys "^V"
    End Sub
    Could anyone help me (if it is possible) to edit this code so that after the data is copied in notepad that the notepad document will be saved automatically as "Analysis.txt" and then placed on the C drive closing notepad and leaving my excel spreasheet still visible? Any suggestions and or assistance would be greatly appreciated. I'm trying to simplify some time consuming elements with this code. Thanks in advance!
    Last edited by lilsnoop; 01-21-2009 at 12:19 AM.

Thread Information

Users Browsing this Thread

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

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