+ Reply to Thread
Results 1 to 2 of 2

Kill Syntax

  1. #1
    Ronbo
    Guest

    Kill Syntax

    I am trying to kill files with the following code;

    Dim tmpName2 As String
    tmpName2 = TmpName & tmpMonth & TmpYear & "Test.xls"
    MsgBox tmpName2
    Kill "c:\test\tmpName2"

    The name is correct but I get an error on the Kill line of code. What is
    the correct code to kill tmpName2.

    Thanks, for any help.

  2. #2
    Jim Thomlinson
    Guest

    RE: Kill Syntax

    tmpname2 is a variable so you need to remove it from the quotes...

    Kill "c:\test\" & tmpName2
    --
    HTH...

    Jim Thomlinson


    "Ronbo" wrote:

    > I am trying to kill files with the following code;
    >
    > Dim tmpName2 As String
    > tmpName2 = TmpName & tmpMonth & TmpYear & "Test.xls"
    > MsgBox tmpName2
    > Kill "c:\test\tmpName2"
    >
    > The name is correct but I get an error on the Kill line of code. What is
    > the correct code to kill tmpName2.
    >
    > Thanks, for any help.


+ Reply to Thread

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