is there any code for opening a file without using any dialogbox? directly

Yes: StreamReader
System.IO.StreamReader

Example:

Imports System.IO
Module mod378486
   Sub ReadFile()
      Dim strData As String
      Dim fileIn As New StreamReader("c:\science\test.txt")
      While Not (fileIn.EndOfStream)
         strData = fileIn.ReadLine()
         Console.WriteLine(strData)
      End While
      fileIn.Close()
   End Sub
   Sub Main()
      ReadFile()
   End Sub
End Module

or

Console.WriteLine(IO.File.ReadAllText("c:\science\test.txt"))

then please mark this thread as solved, thank you.