AnsweredAssumed Answered

Automating Excel File Location

Question asked by Sam Molony on Mar 2, 2017
Latest reply on Mar 3, 2017 by Sam Molony

Hi all,

 

I am using an excel file to determine component dimensions through API, however, I would like this API to be able to run on a separate computer without then need for the code to be altered to the new file location.

 

Is there a way to search for a file/ another method to do this?

 

I basically want to convert this:

 

Set Excelobject = GetObject("D:\Shoulder Screw\Shoulder Screw Data.xlsx")

Set xlsh = Excelobject.ActiveSheet

 

To code which will set xlsh no matter where the file is located.

 

Any help appreciated,

 

Cheers

Outcomes