Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing Windows Commands

Status
Not open for further replies.

kaylabear

Programmer
Oct 23, 2002
59
CA
Hello,

How do I go about telling Windows to perform certain tasks from within my VB application.

Such As: I require Windows to Delete some of the files that make up my program at a given time. Also I would like to set file attributes automatically via my application.

Any insight is greatly appreciated Thank You.
 
Deleting files is easily done within VBA (see the Kill command). For others, the Shell function runs an external application from within VBA.
For example:

shell("attrib c:\hello.xls +r")

would set the read-only attribute for hello.xls
Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top