vba - Bad file name or number when trying to read string from .txt -
i error when try open text file input. code looks right me...
enviro = cstr(environ("userprofile"))  filepath = "c:\users\" & enviro & "\appdata\roaming\microsoft\outlook\path.txt"  open filepath input #1  until eof(1)     line input #1, strpath  loop  close #1 i intend text file have 1 line, path towards workbook.
using environ("userprofile") return e.g.:
c:\users\nalexp so need amend filepath assignment just:
filepath = enviro & "\appdata\roaming\microsoft\outlook\path.txt" 
Comments
Post a Comment