Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macros cannot be viewed...in shared workbooks

Status
Not open for further replies.

dalex17

Technical User
Jul 14, 2002
96
US
Hello,

I have an excel workbook file that uses one set of simple code in VB (I enable macros when opening the workbook). When I attempt to share the workbook (tools, share workbook), I get a message which reads: "This workbook contains macros recorded or written in Visual Basic. Macros cannot be viewed or edited in shared workbooks."

Is there a workaround for this? Does anyone have any suggestions or tips on this.

Kind Regards,

Dalex17
 
Does Application.DisplayEvents = False fix this?


Andy
"Logic is invincible because in order to combat logic it is necessary to use logic." -- Pierre Boutroux
"Why does my program keep showing error messages every time something goes wrong?"
 
What will this do? Will it disable the macros?

Thanks
 
Also, what does the full VB commnad look like:

Should I just insert the following directly in the code of the workbook:

Private Sub Workbook_Open()
Application.DisplayEvents=False
end sub
 
Sorry dalex17 I misunderstood your post.

Surely you want editing and viewing of your macros to be disabled in the shared workbook. The message does not indicate that you would be prevented from running them.

I don't think DisplayAlerts will have any effect on this issue.


Andy
"Logic is invincible because in order to combat logic it is necessary to use logic." -- Pierre Boutroux
"Why does my program keep showing error messages every time something goes wrong?"
 
Andy, I'm not sure I understand your response. I indeed want users to ENABLE macros when opening the report, otherwise I wouldn't have this issue :)

Also, in one of your responses you mentioned Display.Events and the last one mentions Display.Alerts.

Would I be asking too much if i ask that you write a sample VB expression on what you are reccomending?

Thanks,

Dalex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top