Establishing Instances of Excel

deepheat

New Member
Joined
Jul 5, 2006
Messages
46
Hi All,

I have a third-party application that has a facility to export a data set directly to Excel (which the application opens without any interaction on my part). The file name that the application gives to the Excel data is in the format "Portal_nnnnnnnnnnnnn.xls" where "nnnnnnnnnnnnn"is a zero filled random number. (The file is created in C:\DOCUME~1\user\LOCALS~1\Temp\Portlet_nnnnnnnnnnnnn.xls")

I have another workbook that uses VBA to extract data from Portal_nnnnnnnnnnnnn.xls and format it in to something more visually appealling. Within my code I have had to hardcode the filename each time I generate the data from the third-party application.

Can anyone advise me on a VBA method of identifying the third-party-generated Excel instance so that I can reference it dynamically without having to hardcode the file name each time?

Many Thanks

dp
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top