1

Sorry if this is a duplicate, however I doubt that, as I've been Googling for an hour and no search hits even come close to what i'm looking for.

My macro is run from Excel, it opens a PowerPoint presentation from a Sharepoint and handles Excels that are embedded in the pptx.

My problem is that whenever I am stepping through the code, all lines are executed one-by-one as they should, but when I run the line .Range("A" & i).Hyperlinks(1).Follow (this opens the pptx), the code just runs all the way to the end automatically. Keep in mind, I am stepping through - and I am not accidentally hitting F5, or anything like that.

I'm suspecting it's either the hyperlink, or the fact that I am handling PowerPoint from Excel, but can't find the reason.

I am experiencing an issue and want to find where the code goes wrong, but can't as it just "runs away" after following the hyperlink.

David Glickman
  • 713
  • 1
  • 11
  • 18
metrazol
  • 119
  • 1
  • 2
  • 11
  • 3
    Have you tried putting a `Stop` after the `.Follow` line? – CLR Mar 02 '17 at 11:34
  • Does the presentation open successfully? – Zev Spitz Mar 02 '17 at 11:40
  • I have had the same issue when debugging hyperlinks. The simplest solution is to just add a breakpoint immediately following the code running the hyperlink. You can also use 'Debug.Assert' with a condition for it to evaluate. For example 'Debug.Assert 1=2' would cause the code to break at this line. I dont personally find this useful, but I am sure there are those out there that would rather only step through when there is a problem :). – Brandon Barney Mar 02 '17 at 11:53

0 Answers0