Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-09-2015, 05:46 AM
gerris gerris is offline PP Command Button wont run on another PC Windows 7 64bit PP Command Button wont run on another PC Office 2010 64bit
Novice
PP Command Button wont run on another PC
 
Join Date: Dec 2014
Posts: 5
gerris is on a distinguished road
Default PP Command Button wont run on another PC

Does anybody know why a PP Presentation with Counter Button will run on my PC but when I email it to somebody else - it wont run on theirs and they do have the same version of PP.

I tried the VB code as suggested in this forum

Dim Offset As Single
Dim CountNo As Long
Dim x As Single

Private Sub CommandButton1_Click()
Offset = ActivePresentation.PageSetup.SlideHeight + 10
CountNo = 0


' ADJUST THIS waitTime NUMBER WITH SECONDS DELAY BETWEEN COUNTER INCREMENTS
waitTime = 0.5
' ADJUST THIS maxCount NUMBER WITH MAXIMUM NUMBER COUNTER SHOULD REACH
maxCount = 5000
Do Until CountNo = maxCount + 1
ActivePresentation.SlideMaster.Shapes("Counter").T extFrame.TextRange.Text = CountNo
ActivePresentation.SlideMaster.Shapes("Counter").T op = ActivePresentation.SlideMaster.Shapes("Counter").T op + Offset
DoEvents
ActivePresentation.SlideMaster.Shapes("Counter").T op = ActivePresentation.SlideMaster.Shapes("Counter").T op - Offset
x = Timer
While Timer - x < waitTime
DoEvents
Wend
CountNo = CountNo + 92

If SlideShowWindows.Count = 0 Then
ActivePresentation.SlideMaster.Shapes("Counter").T extFrame.TextRange.Text = 1
ActivePresentation.SlideMaster.Shapes("Counter").T op = ActivePresentation.SlideMaster.Shapes("Counter").T op + Offset
DoEvents
ActivePresentation.SlideMaster.Shapes("Counter").T op = ActivePresentation.SlideMaster.Shapes("Counter").T op - Offset
Exit Do
End If

Loop
End Sub


It works perfectly on my PC. Any ideas ? Thanks
Reply With Quote
  #2  
Old 01-09-2015, 07:22 AM
JohnWilson JohnWilson is offline PP Command Button wont run on another PC Windows 7 64bit PP Command Button wont run on another PC Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Couple of possible reasons.

Macro security is set too high for the code to run.

If you emailed it it might open in protected view. This would prevent the code altering the text.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 01-09-2015, 07:56 AM
gerris gerris is offline PP Command Button wont run on another PC Windows 7 64bit PP Command Button wont run on another PC Office 2010 64bit
Novice
PP Command Button wont run on another PC
 
Join Date: Dec 2014
Posts: 5
gerris is on a distinguished road
Default

Thanks for replying - I think it may have been your code originally so thanks for that too
I sent the PP by email and the other person saved it to their machine.

I checked Trust Settings and ensured Macro's were enabled


Should I do something else ?
Reply With Quote
  #4  
Old 01-09-2015, 10:03 AM
JohnWilson JohnWilson is offline PP Command Button wont run on another PC Windows 7 64bit PP Command Button wont run on another PC Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

If they downloaded it tell them to right click on it >> Properties and see if there is an UNBLOCK button.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #5  
Old 01-12-2015, 04:23 AM
gerris gerris is offline PP Command Button wont run on another PC Windows 7 64bit PP Command Button wont run on another PC Office 2010 64bit
Novice
PP Command Button wont run on another PC
 
Join Date: Dec 2014
Posts: 5
gerris is on a distinguished road
Default

Hi Again, Interestingly the other user doesn't see the UNBLOCK Tab but I do. You may have hit on something but I just cant figure it out :-(
Reply With Quote
  #6  
Old 01-12-2015, 05:06 AM
JohnWilson JohnWilson is offline PP Command Button wont run on another PC Windows 7 64bit PP Command Button wont run on another PC Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

UNBLOCK will only appear if they have at least 2010 version. And of course it's their security setting you need to check.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #7  
Old 01-12-2015, 10:17 AM
gerris gerris is offline PP Command Button wont run on another PC Windows 7 64bit PP Command Button wont run on another PC Office 2010 64bit
Novice
PP Command Button wont run on another PC
 
Join Date: Dec 2014
Posts: 5
gerris is on a distinguished road
Default

Funny enough He has 2010
Anyway I know this might be a complete red herring but when I do a search on my machine for the program counter it appears in a xampp/perl//// folder. I don't know how or when it got there but he doesn't have it
Reply With Quote
Reply

Tags
activex, counter, vb



Similar Threads
Thread Thread Starter Forum Replies Last Post
command button query smalc Word VBA 2 03-16-2015 08:26 PM
PP Command Button wont run on another PC Newbie Wants to Add Print Command Button! PapaTom PowerPoint 7 02-25-2013 06:12 PM
PP Command Button wont run on another PC Command Button to Print Labels Claytocb Excel Programming 1 02-01-2013 12:20 AM
PP Command Button wont run on another PC Command Button will not work when document is protected brockjensen Word 1 11-02-2012 06:59 PM
PP Command Button wont run on another PC Command Button cksm4 Word VBA 7 02-27-2011 08:47 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft