I am new to VB I can only design form
so are you doing this in vbs (vbscript), no forms, so unlikely?
I want to open using vbscript
vb6 or vba (visualbasic for applications) within excel, word or someother application?
for either of the latter you can try like
i did not test this
' in command button or other procedure
mypath = "c:\test\folder\"
txtfile = dir(mypath & "*.txt") ' get first txt file name
do while len(txtfile) > 0
f = freefile
open mypath & txtfile for input as f
filestr = input(lof(f), #f)
tiffile = mypath & mid(filestr, 15, instr(16, filestr, "<") -1 -14) & ".tif"
ShellExecute 0, "open", tiffile, "",, SW_SHOWNORMAL
txtfile = dir
' you will also need the api declare in the general section at the top of the form
Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation _
As String, ByVal lpFile As String, ByVal lpParameters _
As String, ByVal lpDirectory As String, ByVal nShowCmd _
As Long) As Long
Const SW_SHOWNORMAL = 1