Why am I getting "Invalid use of property" - Access VBA "Kill"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarkBStewart
    New Member
    • May 2010
    • 20

    Why am I getting "Invalid use of property" - Access VBA "Kill"

    I am tyring to fiigure outhow to use the Kill statement in VBA. My code is below. I am getting invalid use of propery" error

    Private Sub Kill_Click()
    Dim KillFile As String
    KillFile = "c:\KILL\temp.x ls"
    SetAttr KillFile, vbNormal
    Kill KillFile
    ' Kill ("c:\KILL\temp. xls") (Tried this as well)

    End Sub

    c:\KILL\temp.xl s exists. I created it to test this out.

    Any help would be appreciated. Thx
  • MarkBStewart
    New Member
    • May 2010
    • 20

    #2
    Nevermind - figure it out. Need Filesystem.Kill per the following:

    FileSystem.Kill KillFile

    Comment

    Working...