Macros in Shared Workbook

G

Guest

Hi All,
I have a shared workbook that contains a macro. When I attempt to run the
macro, I get the error saying I can't have macros in a shared workbook. Is
there anyway around this? Any help is greatly appreciated.
Thanks,

Matt.
 
G

Gord Dibben

You can run have and run macros in a shared workbook.

You cannot view or edit the macros.

How are you attempting to run the macro and is that the exact error message you
receive?


Gord Dibben MS Excel MVP
 
G

Guest

Nope. Macros and shared workbooks don't get along (along with a whole pile of
other functionallity). From my experience shared workbooks cause more trouble
than they are worth. Just my 2 censt for whatever that is worth...
 
G

Guest

The exact message is: "Run-time error '1004': Unprotect method of
Worksheet failed" Before that error though, it does mention not being able
to have macros in a shared workbook.
 
D

Dave Peterson

There are somethings that shared workbooks can't do--whether in a macro or by
the user.

One of them is changing the protection of a worksheet.

Look at Excel's help for "features unavailable in a shared workbook" and you'll
see a list.
 
G

Gord Dibben

You cannot unprotect a sheet in a shared workbook, either through macro or
manually.

The exact message you receive when you have a workbook with macros and decide to
share that workbook is.........

"This workbook contains macros recorded or written in VBA. Macros cannot be
viewed or edited in shared workbooks."

Nothing there about not being able to run the macros.

You are just trying to run a macro that has an illegal command.


Gord Dibben MS Excel MVP
 
G

Guest

Technically you can have macros in shared workbooks, however practically it
is a real up hill battle because of the restrictions on shared workbooks. IMO
(just my 2 cents again) macros and shared workbooks just don't get along to
the point where they are not worth the hassel. You will be forever debugging
and trying to work around the limitations imposed by shared workbooks.
 

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