ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protecting VBA Project (https://www.excelbanter.com/excel-programming/303803-protecting-vba-project.html)

ads

Protecting VBA Project
 
I have a simple file with VBA to import text data into excel, the code
enaabling the useer to select the the name of the text file. Depending on
the text file name the user can name the excel file anything they want. This
worked ok until I tried to protect the vba sheets. Once I did that the code
still worked but the excel file could not be saved. Any idea of why
protecting a project would prevent it from being saved under another name.


ads



Avner[_2_]

Protecting VBA Project
 
i'm not sure,
The name of the Text File is entered into your code. you are the onl
one that can save changes to the code (while saving the file).
Maybe try reset variables before closing.

Or maybe i am wrong

Avne

--
Message posted from http://www.ExcelForum.com


ads

Protecting VBA Project
 
The code opens a dialog box which enables the user to select the text file
to import, all text files being of same layout. After selection the data is
imported into the excel file. The problem is the code works if the project
is protected or not with any named text file, its is that the file cannot be
saved under a different name if the project is protected, if it is not
protected the excel file can be saved under any name the user chooses.

ads

"Avner " wrote in message
...
i'm not sure,
The name of the Text File is entered into your code. you are the only
one that can save changes to the code (while saving the file).
Maybe try reset variables before closing.

Or maybe i am wrong

Avner


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 02:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com