View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.setup
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default How to run macro on Excel 2007 protected sheet?

Where is the code?

Is it in a General module or behind a worksheet?

maybe...
me.parent.Sheets("Purchase Order Template").unprotect Password:="password"

But I'm out of guesses.



Valter wrote:

Hi Dave,

well, I can unprotect the sheet manually, that's no problem, but since the
file will be used by many others outside my domain, it's kinda unpractical to
share the password with all of them, then what's the use of the protection :)
...

It's purchase order that automatically calculates prices and discounts basen
on the user input, and presents the figures in 3 different currencies, again
based on the user shoice. So I have settings sheet where user should type in
data (company, address, discount in %, pick the currecncy) and the rest is
done on the Purchase Order Sheet. Data typed in settings sheet is replicated
to Purchase Order Sheet. The problem comes when something needs to be changed
in the protected cell(s) on the Purchase Order Sheet.


--

Dave Peterson