So i am trying to make this program open a file that the user chooses so i have them first enter their file that is already on the desktop and put the .txt extension after the name and then i try to add the name at the end of the directory and it says on line: 10 column: 1 Type mismatch any help would be appreciated thanks. I am new to this :)
Option Explicit
Dim a, b, c, d, e
Set a = createobject("wscript.shell")
c = msgbox("Welcome to my word finding program!", vbInformation+vbOkCancel+vbDefaultButton1+vbSystemModal, "Information: ")
b = inputbox("MAKE SURE THAT YOUR FILE IS ON YOUR DESKTOP!" &vbLf& "Please enter the name of your .txt file" &vbLf& "Rembmer to add .txt after it" &vbLf& "EX: Name.txt")
a.run"C:\Users\%username%\Desktop\", b