andycharger Posted June 26, 2003 Posted June 26, 2003 (edited) Im trying to open a text document on a button click for a test. However, the debugger says it cannot find the file. Can anyone see any obvious errors in the code? The files does exist on my c: drive! Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Shell("c:\obdcconf.txt") End Sub Edited June 26, 2003 by divil Quote
*Experts* mutant Posted June 26, 2003 *Experts* Posted June 26, 2003 You should use this to start processes and programs, dont use Shell: System.Diagnostics.Process.Start() Btw. Its [ vb ] and [ /vb ] to make it appear as vb code :) , without spaces. Quote
andycharger Posted June 26, 2003 Author Posted June 26, 2003 Like this? Do you mean I write the code as follows: System.Diagnostics.Process.Start("C:\odbcconf.txt") inside the sub? Andy Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.