Permission denied when adding script object (seems Excel bug)

R

Raja

Hi,

I have the following problem in Excel2007

1. I've created a new xls workbook
2. Added a script object to sheet1 as follow(using VBA)
Set lScript = Sheet1.Scripts.Add(, msoScriptLocationInBody,
msoScriptLanguageOther, "Script1")
3. SaveAs xls workbook to xlsx format, then i got to warning message that
script object will be deleted and then I accepted the changes
4. Close Excel
5. Open the xlsx file that saved in step 3
6. SaveAs to xls format again
7. I've tried to add the script object again to the sheet. as follow
Set lScript = Sheet1.Scripts.Add(, msoScriptLocationInBody,
msoScriptLanguageOther, "Script1")
8. I've got "Permission denied" Error. it seems because the the script is
already there. I've tried to search the id in the script collection. but i
couldn't find it. it seems it exist but hidden.

Regards
Raja
 

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