close

At this site, you guys helped me out on some code to automatically name tabs
from an entry on the worksheets. Works great, thanks!

When I protect the workbook, however, the code does not work. Did I do
something wrong, or does this normaly happen?

I have to protect the workbook for various reasons. Actually, that is why I
needed the tabs to be named automatically.

Any insights welcome!

When you protect a worksheet/workbook, even VBA becomes limited.

For example, if a sheet is protected and you use VBA to add a row, you'll
get a runtime error.

You need to add code to your VBA routine that will unprotect the sheet, do
its thing, and then protect it again.

Sheets(quot;whateverthenamequot;).UnProtect
....
Sheets(quot;whateverthenamequot;).Protect

Hope that helps.

--
-David Dquot;Stillaquot; wrote:

gt; At this site, you guys helped me out on some code to automatically name tabs
gt; from an entry on the worksheets. Works great, thanks!
gt;
gt; When I protect the workbook, however, the code does not work. Did I do
gt; something wrong, or does this normaly happen?
gt;
gt; I have to protect the workbook for various reasons. Actually, that is why I
gt; needed the tabs to be named automatically.
gt;
gt; Any insights welcome!

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()