X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> On Error When Running A Macro, Office 2013    
post Apr 27 2017, 02:46 PM

Posts: 1,316
Joined: 17-November 13
From: Orewa New Zealand

I have put a macro on the tool bar in the developer tab called 'Insert Data' and calls 2 procedures
The macro works on the template power point I have just the way I want it to thanks to the awesome help I received from here thanks.gif
The slides get transferred to someone elses power point presentation fine great but when the click on the' insert data' it does not work and I dont want it to so all is good

Now I would like to have a message box come up that when the error is the macro can not be found to say "Sorry you can not use Insert data Please see Graeme" and not have the warning Microsoft put out
which is 'Macro cannot be found or has been disabled because of your security settings' and I no its not the security settings because the macro runs specific file paths that are not on this persons computer

Things I am not sure of
Do I put it in the original macro
and I am not sure what code to put

or am I seeing the 'insert data' because It is on my machine that I am testing it with and the other person will not even see the' insert data' icon because it is set up for my machine only
and with that said if I send my whole file to the right person "Graeme" with right file paths etc will they even see the 'insert data" on their tool bar and be able to use it or is that for my machine and tool bar only
Bit confused sorry first time ever coding in power point and first time I have ever put macros on the tool bar in a file to give to someone else who then lets another person use the finished slide
Go to the top of the page
Doug Steele
post Apr 27 2017, 04:17 PM

UtterAccess VIP
Posts: 22,223
Joined: 8-January 07
From: St. Catharines, ON (Canada)

If PowerPoint can't find your macro, it doesn't really matter whether or not you've put error trapping in it: it's not going to get run!

Why do you think it's not the security settings? All Office products require that the file exist in a Trusted Location before it'll run macros.

On the other user's computer, open a PowerPoint presentation (ideally yours...) Click on the File tab, then select Options from the bottom of the choices on the left-hand side.

Select Trust Center from the bottom of the choices on the left-hand side of the new window that opens, and click on the Trust Center Settings... button on the right-hand side.

Attached File  PowerPoint_Options.jpg ( 120.92K )Number of downloads: 0

Once you're in the Trust Center, choose Trusted Locations (second from the top on the left-hand side), then ensure that the folder where the file exists is added to the list of trusted locations

Attached File  PowerPoint_Trusted_Locations.jpg ( 147.12K )Number of downloads: 1
Go to the top of the page
post Apr 27 2017, 04:25 PM

Posts: 1
Joined: 27-April 17

wornout it sounds like some security issue. Are you sure you're not getting any 'untrusted location/macro' alert?
Go to the top of the page
post Apr 27 2017, 10:01 PM

Posts: 1,316
Joined: 17-November 13
From: Orewa New Zealand

Not a security issue because I looked

Person A is me who has made the macros and graphs I am giving a file that holds a database and powerpoint(presentation template.pptm) 1 time only to
Person B who enters some data in access and updates the slide in powerpoint weekly by the macro insert data and then
Person C takes his presentation with other department slides in it and goes new slide from file and navigates to person Bs presentation uses the slide which is static.

The Presentation template. pptm!insertData macro icon is on the developer tab with words saying InsertData which I suspect just stays there with every powerpoint I open because its on my machine

steps I took( all I my machine) to emulate person C
created a new powerpoint presentation and saved it as a macro enabled and called it Presentation1 the insert data macro is still on the ribbon( I suspect because its my computer)
add new slide from file
navigated to presentation template.pptm
inserted the slide
so far all good
on the new presentation I went to the developer tab and insert data is there
I click on it and it brings up 'Macro cannot be found or has been disabled because of your security settings'
it can not be found because the macro that is now in the ribbon is for the Presentation1 . pptm!insertData and there is no such macro

so what I want to know is
if it is someones elses computer my customized ribbon should not show up on their ribbon if not thats great but if it does then
if the macro is not called Presentation template. pptm!insertData then my message box shows

I really hope that lot makes sense I know what I am trying to say I am just struggling to put it into words ha ha
Go to the top of the page
post Apr 27 2017, 10:07 PM

Posts: 1,316
Joined: 17-November 13
From: Orewa New Zealand

I just found my answer the customized ribbon only stays with my computer so person C wont even see the inset data icon so he wont click on it so it wont bring up the message so all good but now I do have to find out how I send the ribbon part to person B as that is who needs to use it
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    20th November 2019 - 03:20 PM