|
-
Nov 18th, 2000, 01:08 PM
#1
Thread Starter
Lively Member
I put a few lines of code in the app I'm working on to kill some files:
File = Dir$(MyDir)
Do While File <> ""
MyStr = Left(File, 4)
If MyStr = "test" Then
MyTemp = MyDir + File
kill MyTemp
End If
File = Dir$
Loop
Right after I typed that in it worked. But now I always get a "Compile Error: Invalid use of Property", and VB takes the K down to lowercase.... without blue coloring as if not recognizing it as a command.
I really can't figure out what the problem is... it did work the first time!
Thanks for any help
-
Nov 18th, 2000, 02:56 PM
#2
Guru
That could occur because of a property named kill.
Code:
Option Explicit
Property Get kill()
End Property
Property Let kill(V)
End Property
Sub Test()
kill "MyFile" ' Compile error: Invalid use of property
End Sub
If that is the case, rename the property.
This is also why Kill refuses to be proper-cased.
-
Nov 18th, 2000, 03:29 PM
#3
Thread Starter
Lively Member
Man I'm stupid... that was exactly it. I named the button for the function "kill".
....live and learn.
Thank you very much!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|