R
reidarT
I need to find a file (xls) and start Excel with this file
My code is
Dim Sti As String = "C:\Documents and Settings\Navn\My Documents\"
Dim Filnavn As String = "Testfile.xls"
Dim Sti2 As String = "C:\Program Files\Microsoft Office\OFFICE11\"
Dim Filnavn2 As String = "Excel.exe"
Dim StiFilnavn As String = Sti & Filnavn
Dim StiFilnavn2 As String = Sti2 & Filnavn2
If My.Computer.FileSystem.FileExists(StiFilnavn) Then
MsgBox("File found.")
Shell(StiFilnavn, AppWinStyle.NormalFocus)
...
There is something wrong with the code,
The message is Filename not found even if the FileExist says the file is
existing.
I have tried with Shell(""" & StiFilnavn & """,AppWinStyle.NormalFocus), but
it doesn't hlp
reidarT
My code is
Dim Sti As String = "C:\Documents and Settings\Navn\My Documents\"
Dim Filnavn As String = "Testfile.xls"
Dim Sti2 As String = "C:\Program Files\Microsoft Office\OFFICE11\"
Dim Filnavn2 As String = "Excel.exe"
Dim StiFilnavn As String = Sti & Filnavn
Dim StiFilnavn2 As String = Sti2 & Filnavn2
If My.Computer.FileSystem.FileExists(StiFilnavn) Then
MsgBox("File found.")
Shell(StiFilnavn, AppWinStyle.NormalFocus)
...
There is something wrong with the code,
The message is Filename not found even if the FileExist says the file is
existing.
I have tried with Shell(""" & StiFilnavn & """,AppWinStyle.NormalFocus), but
it doesn't hlp
reidarT