Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I got the error like Macro parse failed. functionality was lost.
I am not able to add new sheet . please anyone provide some suggestion\resolution on it.
Hi Pradip,
Can you share the macro code or application ? We will check from end also.
Thanks,
Venkata Sreekanth
Sub AddSheet
Set newsheet=ActiveDocument.CreateSheet
Set sp=newsheet.GetProperties
'sp.Name="Tab" & Right(sp.Name,1)
sp.TabAttr.FgColor.PrimaryCol.Col = RGB(0,0,128)
sp.ZoomFactor=0.78
newsheet.SetProperties sp
newsheet.Activate
ActiveDocument.ActiveSheet.Promote
End Sub
Sub FitZoom
ActiveDocument.ActiveSheet.FitZoomToWindow
End Sub
I have tried Ctrl+shift+m , where i have choose first option to allow execution of macro but it did not work.
Server side i have ticked 'Allow macro execution in server', but issue is still there.
Could anyone please reply on above issue.
Hi Pradip,
Can you change the setting as like below.
Requested Module Security : Safe Mode
Current Local Security : Allow System Access
Regards,
Venkata Sreekanth
As per your reply, I have applied changes. But still error is there. In Document properties setting , I have ticked the Add Sheet in User Privileges. After this I am able to add the sheet. But I am not able to add new sheet object.
Please could you provide some solution for that.
Hi Pradip,
Can you check wether you have same settings in Document Properties & Sheet Properties.
Thanks for the reply. I have verified this setting and it is same as you have mentioned. but the issue is still there.
I would comment out all the lines in Sub Addsheet. Try running that. It will do nothing, of course, but if you get no error, than uncomment the lines one at a time and run the macro again. That will help to isolate the error cause.
It would appear that the API has changed slightly and that is causing the Sub to fail.
There is no issue with Add Sheet macro after enabled the Add sheet option in security tab in Document properties. the problem is that I am not able to add new sheet object.