+ Reply to Thread
Results 1 to 4 of 4

Excel VBA Notepad - overwrite possible?

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Excel VBA Notepad - overwrite possible?

    Hello,

    been trying for ages to no avail!

    can i use VBA to:
    Open a Notepad File (.html)
    Clear text
    (or overwrite all text)
    Paste a value/string (have no problem defining string ect...)

    Thanks
    P

  2. #2
    Registered User
    Join Date
    11-15-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Excel VBA Notepad - overwrite possible?

    Any reason not to just over write the whole file using the FileSystemObject? Check out the creating a new text file section here: http://www.wiseowl.co.uk/blog/s211/writeline.htm

    You should be able to just write over the file, rather than open, clear, and writeline.

  3. #3
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Excel VBA Notepad - overwrite possible?

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    01-15-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Excel VBA Notepad - overwrite possible?

    Thank you! helped me out massively!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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