PowerPoint VBA to be used by coworkers

E

Edvado

Hi, I have developed a reasonably complex VBA macro running behind a
PowerPoint presentation that many people in my office would like to use.
The original file resides on a server that all my coworkers have access
to. When I e-mailed the Powerpoint presentation to the guy sitting next
to me, it worked immediately then suddenly stopped with some sort of
access rights error.

The point in the code at which it repeatedly hung had been crossed a
couple of dozen times before then, and it had NOTHING to do with file
access, so I was pretty stumped. Then I realized it coincided with when
I opened MY OWN COPY of the same presentation to do some more
development on the VBA.

The Access error he was getting seemed to indicate that HIS PPT
presentation was actually running the VBA in MY presentation on my
machine.

Is there any way to tie the VBA directly to one instance of a PPT
presentation, and not any copies of that presentation?

Is there distribute a presentation with this code so that it will not
seek out the original presentation it was created in and run it from
there?

Would exporting the code to files and then importing it to another
presentation accomplish this?

Would creating a template from my copy of the presentation and having
them use that template accomplish this?

I apologize if this has already been answered in this newsgroup. When I
first subscribed, there were more than 8,000 messages, and even skimming
was taking a very long time.

-Edvado
 
S

Steve Rindsberg

Hi, I have developed a reasonably complex VBA macro running behind a
PowerPoint presentation that many people in my office would like to use.
The original file resides on a server that all my coworkers have access
to. When I e-mailed the Powerpoint presentation to the guy sitting next
to me, it worked immediately then suddenly stopped with some sort of
access rights error.

The point in the code at which it repeatedly hung had been crossed a
couple of dozen times before then, and it had NOTHING to do with file
access, so I was pretty stumped. Then I realized it coincided with when
I opened MY OWN COPY of the same presentation to do some more
development on the VBA.

The Access error he was getting seemed to indicate that HIS PPT
presentation was actually running the VBA in MY presentation on my
machine.

Is there any way to tie the VBA directly to one instance of a PPT
presentation, and not any copies of that presentation?

That's how it works ... there's no connection to other files/copies of files
unless you both happen to have the same file open at once or the macro is
accessing some other file/template that another user has open.

It strikes me that you may be misled by a cryptic error message.
Can you post the exact text of the message here?
 
D

Dave

Steve Rindsberg said:
That's how it works ... there's no connection to other files/copies of
files
unless you both happen to have the same file open at once or the macro is
accessing some other file/template that another user has open.

It strikes me that you may be misled by a cryptic error message.
Can you post the exact text of the message here?

could it be that you were linking to some graphic or other object that got
locked when you opened your copy? maybe try turning off your machine or
unplug it from the network and see if his still runs or if its missing
something.
 
E

Edvado

Dave said:
could it be that you were linking to some graphic or other object that
got locked when you opened your copy? maybe try turning off your
machine or unplug it from the network and see if his still runs or if
its missing something.


Ok, here's the sequence:
I developed a PPT (we are REQUIRED to use PPT for this) presentation
that displays a map. It then prompts the user for a series of latitude
and longitude coordinates and a number for each, and puts a shape at each
point with the number on top.

It works like a charm. The objects get placed, and the numbers, in a
text box are placed on top and each pair are grouped together. To
accomplish the grouping, I apply a name to each shape and text box. I
call the shape "icon" and the textbox "number".

I debugged the HELL out of the process, then put the presentation on a
common server.

My coworker copied the presentation to his desktop and began
processing. I watched him do the first three or four to make sure all
was working correctly, and left him to finish. I then went to my desk,
fiddled with some other stuff, and eventually went back to the
presentation to see if I could add some comments and tighten up the code.

I almost immediately heard "Uh, Edvado...." and my coworker showed me
an error message that said something like "Access error" (I don't have
the exact phrase here, I am not at work and won't be until next week).

I hit DEBUG and found it was at the point where it named the shape
"icon" which makes NO sense with the access error. When I hit the prompt
to find out what it meant by an access error, the system told me I was
trying to open a file or read from a directory which was not available to
me. Again, all the code was trying to do was assign a name to an object.
The processing had passed through this point in the code on every one of
the points my coworker had processed up until then.

I went back to my desk and attempted to replicate the problem on my
computer. I couldn't. I got to the point where it failed on his
machine, and went flying through.

I then closed the presentation on my desk and Voila! He was able to
proceed.

Seems to me that there is something (the code?) in my copy of the
presentation that his presentation was trying to access. When i opened
my copy, he got an access error because the file was already in use on my
desk.

So how do I seperate the two presentations?

-Edvado
 
D

Dave

Edvado said:
Ok, here's the sequence:
I developed a PPT (we are REQUIRED to use PPT for this) presentation
that displays a map. It then prompts the user for a series of latitude
and longitude coordinates and a number for each, and puts a shape at each
point with the number on top.

It works like a charm. The objects get placed, and the numbers, in a
text box are placed on top and each pair are grouped together. To
accomplish the grouping, I apply a name to each shape and text box. I
call the shape "icon" and the textbox "number".

I debugged the HELL out of the process, then put the presentation on a
common server.

My coworker copied the presentation to his desktop and began
processing. I watched him do the first three or four to make sure all
was working correctly, and left him to finish. I then went to my desk,
fiddled with some other stuff, and eventually went back to the
presentation to see if I could add some comments and tighten up the code.

I almost immediately heard "Uh, Edvado...." and my coworker showed me
an error message that said something like "Access error" (I don't have
the exact phrase here, I am not at work and won't be until next week).

I hit DEBUG and found it was at the point where it named the shape
"icon" which makes NO sense with the access error. When I hit the prompt
to find out what it meant by an access error, the system told me I was
trying to open a file or read from a directory which was not available to
me. Again, all the code was trying to do was assign a name to an object.
The processing had passed through this point in the code on every one of
the points my coworker had processed up until then.

I went back to my desk and attempted to replicate the problem on my
computer. I couldn't. I got to the point where it failed on his
machine, and went flying through.

I then closed the presentation on my desk and Voila! He was able to
proceed.

Seems to me that there is something (the code?) in my copy of the
presentation that his presentation was trying to access. When i opened
my copy, he got an access error because the file was already in use on my
desk.

So how do I seperate the two presentations?

-Edvado

if he truly copied the whole thing to his machine, unplug his machine from
the network and see if it still works. that might point to something that
is shared that you didn't know about. most likely it will fail while
starting up saying it can't create some object. MS stuff has an ugly way of
remembering references to things that you may not think of.
 

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