Originally Posted by
Magerator
Now I have a little problem if some user has that file(wasteproposals.xls) allready open, then of course it won't work if and when user has write rights to the file.
What I would like to do is to give all users "read" rights to the folder and the file, and tell the username and password in the code that will do the saving. Then it doesn't matter if some people have the file open, when they only have read rights to it.
Is this possible to tell in the code one username and password which will do the saving ?
It might be simplest to apply a write reserved password to the file that only you know - this way the file will be opened by others as read-only but the code can use the password to write to the file.
(you can set this password via File -> Save As -> General Options -> Password to Modify)
The modified code line would be:
remember though that those determined enough can circumvent security if they really want to.
Originally Posted by
Magerator
1) When user first clicks on the macro, messagebox would appear saying : "Are you really sure you want to make a waste proposal of the selected items ! " Or something in that direction...
answer "yes" will continue...answer "no" will abort the code.
You can use a pre-emptive MsgBox to do this (prior to first With Application line) - in general terms:
Originally Posted by
magerator
2)If user answers "yes" then after the code is complete, message box would say : "Waste Proposal Complete , file can be found in "Waste Proposal" directory on the Common Files drive"....or something in that direction
Again a msgbox should suffice... in general terms prior to ExitPoint: line
Bookmarks