VB errors when hitting ESC key

  • Thread starter Thread starter Bob Jones
  • Start date Start date
B

Bob Jones

Hope someone can help with this.

I've created a PPS presentation and running it in Kiosk
mode. Each slide has control buttons to navigate back &
forth, replay or exit etc. All the buttons work fine.

But if I hit the ESC key, the presentation ends with VB
error message saying:

'This action will reset your project, proceed anyway?'

It seems to generate an error for every slide circa 30.

Checking with help the one line that might indicate what
the problem is:

'You attempted an edit that prevents continued execution,
for example, you declared a static variable'

To give you an idea of what I've got in the VB coding

Private Sub PreviousButton_Click()
With SlideShowWindows(1).View
.GotoSlide 6
End With
End Sub

So all I've got is 5 control buttons on each slide with
variations of the above code.

So folks, what am I doing wrong, how do I allow the
presentation to be aborted using the ESC key without
generating the error messages?

Thanks

Bob
 
Silly question perhaps, but why use control buttons for navigation when you
could use Action Settings (ie, Next, Previous, First, Last, etc)? All you
need to do is put them on the master and they automatically appear on every
slide.

And they don't grumble when you press Esc. <g>

But if that's not practical for some other reason, let us know what line the
code stops on when it errors.
 
No not silly. I'm using animations and a narrative. I
need them to replay when navigated to. Alas control
buttons don't do it.

There's always the old "blank slide with 0-second transition to next slide
immediately prior" trick, but I can see where that'd get real klunky real
fast with a lot of slides to attend to.

So what line of code does the error happen on?
 
Well when I try to run through the code in VB the error
seems to occur on

With SlideShowWindows(1).View

The error says:

SlideShowWindows (unknown member): Integer out of range.
1 is not in the valid range of 1 to 0.


Yup I know

Got me puzzled :-)
 
Bob said:
Well when I try to run through the code in VB the error
seems to occur on

With SlideShowWindows(1).View

Ah. After you hit ESC, there's no SlideShowWindows of any type, so that line
will fail.
You'll need to figure out what code's running at that point and why, or if
it's harmless enough, put

On Error Resume Next

prior to it to quiet it down.
 
Steve thanks for your help. Alas the solution didn't work.

However I might be chasing a red herring. I got a couple
of colleagues to run the PPS on their machines and when
they hit ESC, guess what no errors!!

It must be me.

Thanks again.

Bob
 
Back
Top