I need to access an Excel file from an external program in order to read data from one of the sheets in the Excel file. The file/sheet I need to access is protected so it is not accessible to the external program I am using. The file has code in the Workbook_Open and Workbook_BeforeClose events which hides and unhides the DATA sheet in using xlSheetVisible\xlSheetVeryHidden.
I want to write a macro in one file which will open the Excel file in question and save a copy of the file with the DATA sheet visible so my external program can access the information in the DATA sheet. Once it has read the information I will have the external program delete the copy of the file.
Can someone provide guidance on how to go about writing the macro to make a copy of the file with the DATA sheet unprotected? Also, the VBA in the file I need to open/copy is protected with a password which I can hard code into the macro if necessary.
Thanks
I want to write a macro in one file which will open the Excel file in question and save a copy of the file with the DATA sheet visible so my external program can access the information in the DATA sheet. Once it has read the information I will have the external program delete the copy of the file.
Can someone provide guidance on how to go about writing the macro to make a copy of the file with the DATA sheet unprotected? Also, the VBA in the file I need to open/copy is protected with a password which I can hard code into the macro if necessary.
Thanks