Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88087

Open Excel 2016 workbook using Microsoft Edge or Chrome, ActiveWorkbook Path and Filename set to local directory instead of internal web directory

$
0
0

Recently, the company upgraded to Windows 10 from Windows 7. Along with the operating system upgrade, an upgrade to Office from 2010 to 2016 occurred. The company is running a Visual Studio 2013 application that will download Excel workbooks to extract, view and modify (add, update, or delete) data using VBA. The workbooks use ActiveWorkbook.Path and ActiveWorkbook.FileName to determine the environment to update. If the ActiveWorkbook.Path or ActiveWorkbook.FileName contained “SERVER1” this meant the production environment but if either contained “SERVER2” this meant the development environment. This functionality prevented users from using saved copies of the workbook and ultimately would update the wrong environment. Since the company standard is to use a more modern browser, Microsoft Edge or Chrome, test revealed an issue in both browsers. Both browsers download the file to either the local internet temporary file or local download directory. After opening the downloaded file, the values for ActiveWorkbook.Path and ActiveWorkbook.FileName are the local directories. As part of open functionality, the VBA code attempts to extract the server name from the ActiveWorkbook.Path and/or ActiveWorkbook.FileName. Since the server name does not exists, the workbook defaults to the test environment. Since the user does not have access to change the variable storing the server name, the user cannot use the workbook.

I do not want to hardcode the server into the workbook. I do not want to rely on the user to select the appropriate environment. I would like to workbook to open directly from the server. I understand this could be a security issue but the users want it.

I research and cannot find a solution to this issue. I would appreciate any suggestion to resolve this issue.

TIA Anthony


Viewing all articles
Browse latest Browse all 88087

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>