Deleting File From Network (1 Viewer)

GT_engineer

Registered User.
Local time
Today, 08:16
Joined
Aug 23, 2012
Messages
85
I have a button that adds pictures/files to a network location. So people from all over the company can do this and all pictures/files are stored in one location.

I also have a delete button, but a waning pops up and the file remains on the network.

PHP:
Run-time error '424':
 
object required

my code

Code:
My.Computer.FileSystem.DeleteFile (Path)

where Path is a string, files location on network
 

Minty

AWF VIP
Local time
Today, 13:16
Joined
Jul 26, 2013
Messages
10,371
Have you called your string variable "Path" ?
 

GT_engineer

Registered User.
Local time
Today, 08:16
Joined
Aug 23, 2012
Messages
85
Minty

my path was correct, I changed my code to
Code:
Kill(Path
)

now it works! thanks
 

Minty

AWF VIP
Local time
Today, 13:16
Joined
Jul 26, 2013
Messages
10,371
Okay - I think Path would possibly be a reserved word that was my thinking. Oh and I was going to suggest Kill , but you beat me to it :)
 

Users who are viewing this thread

Top Bottom