Protecting VBA Project

A

ads

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
 
A

Avner

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
 
A

ads

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
 
A

ads

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top