• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

stepping through f8, code suddenly executes all code

Hi all,


I am trying to modify part of my macro and while i am trying to debug it using F8, at some line its start running. The macro it self is just a simple copy paste from excel to powerpoint (I am using early binding). Here is the part where the macro start running

(Right after the paste line)

[pre]
Code:
'   ....
Sheets("5 Group").Select
ActiveSheet.ChartObjects(1).Activate
ActiveChart.ChartArea.Copy
cnt = cnt + 1
oPP.Slides.Add cnt, ppLayoutBlank
Set oPS = oPP.Slides(cnt)
oPS.Select
oPS.Shapes.Paste
Application.CutCopyMode = False
oPS.Shapes(oPS.Shapes.Count).Select
'   ....
[/pre]
It was working fine before and I even can put breakpoint before the paste code.

I hope anyone can shed a light on this problem. Thank you in advance and sorry if I did not reply in short time.


Srikandi


PS. I've tried running the original code in break mode and the same thing happen as well.
 
Found someone with the same problems as mine at

http://stackoverflow.com/questions/11574783/stepping-through-f8-code-suddenly-executes-all-code


still looking for the app that might cause the problem. Has anyone else experience this
 
Hi, srikandi2000!

Where's that snippet placed? In any normal module under any procedure name or in a worksheet or workbook class module under an event name procedure? And how is it run, manually or triggered automatically?

Consider uploading a sample file (including manual examples of desired output if applicable), it'd be very useful for those who read this and might be able to help you. Thank you. Give a look at the green sticky posts at this forums main page for uploading guidelines.

Regards!
 
Hi srikandi2000 !


Could you test on another computer ?


If you could not reproduce the issue on another computer …


Some laptops have some keyboard program overlay for special shortcuts like brightness, sound, networks, …


Even it could be a keyboard spyware …
 
@SirJB7 : It is in normal module. Usually I just trigger it manually (F5 or attach the macro to a shape)... I will try to do what Marc L suggest, if it does not work, I will upload the file but it is quite a mess.


@Marc L : Thank you for your suggestion. I will try to do that.


EDIT : Somehow it works now. I did not install or do anything else to the system or excel. So, I can't tell what is going on.
 
Hi, srikandi2000!

I don't know what actually does that procedure, but maybe you could try to create another workbook with a minimum of sample data and run it on that test file, just to discern if it's an issue of that workbook or another more generalized.

Regards!
 
Is there any other macro's that are based on a Worksheet Change or Change event that is triggering something?


What about disabling events before the copy/paste

re-enable after the paste

[pre]
Code:
Application.EnableEvents = False

' Coding to skip these events

Application.EnableEvents = True
[/pre]
 
Thanks Hui, I will try it. I do have some events.


I am still trying to figure it out since I cannot reproduce the problem anymore.


I will post a sample after I fix the indentation and all.


@SirJb7, it is basically just copy pasting Chart & Table from Excel to Powerpoint.
 
Back
Top