Вы можете просто заменить текст, а затем снова записать все обратно в файл:
Dim content As String
' read all text from the file to the content variable
content = System.IO.File.ReadAllText("E:\myFile.txt")
' replace number, text, etc. in code
content = content.Replace("<string to replace>","<replace with>")
' write new text back to the file (by completely overwriting the old content)
System.IO.File.WriteAllText("E:\myFile.txt",content)