Relative instead of Absolute paths in Excel VBA

前端 未结 8 941
眼角桃花
眼角桃花 2020-12-05 04:10

I have written an Excel VBA macro which imports data from a HTML file (stored locally) before performing calculations on the data.

At the moment the HTML file is ref

8条回答
  •  渐次进展
    2020-12-05 04:41

    Just to clarify what yalestar said, this will give you the relative path:

    Workbooks.Open FileName:= ThisWorkbook.Path & "\TRICATEndurance Summary.html"
    

提交回复
热议问题