Results 1 to 5 of 5

Cannot do this simple task

Threaded View

  1. #1
    Registered User
    Join Date
    12-07-2016
    Location
    Jujuy, Argentina
    MS-Off Ver
    Office 2016
    Posts
    2

    Angry Cannot do this simple task

    I'm trying to append a text in a file text but error 5 popups, here's my code
    Option Explicit
    Sub Appentext()
    Const ForReading = 1, ForWriting = 2, ForAppending = 3
        Dim fs, f
        Set fs = CreateObject("Scripting.FileSystemObject")
        Set f = fs.OpenTextFile(ActiveWorkbook.Path & "\pool1.txt", ForAppending, TristateUseDefault)
        f.Write "Hello world!"
        f.Close
    End Sub
    I referenced the module to Microsoft Scripting Runtime. I use Excel 2016.
    I do not know what is happening,
    Last edited by alansidman; 12-07-2016 at 10:01 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Change Cell Value to create Summary Sheet
    By vientotambo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2013, 06:11 PM
  2. simple task i hope
    By txbob12750 in forum Excel General
    Replies: 2
    Last Post: 10-10-2012, 10:27 PM
  3. simple task i hope
    By txbob12750 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-10-2012, 08:42 PM
  4. [SOLVED] How to separate text?
    By am1221 in forum Excel General
    Replies: 4
    Last Post: 10-10-2012, 04:56 AM
  5. Help needed in a simple task
    By vmantrana in forum Excel General
    Replies: 3
    Last Post: 04-17-2006, 08:00 PM
  6. Question about Simple task
    By aksama in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-01-2006, 11:45 PM
  7. well it seemed a simple task
    By bigtounge1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-04-2005, 03:33 PM
  8. Simple Task, but need help
    By alexm999 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2005, 02:56 PM

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