Is the presentation with the random slides saved as a pptm file?
Are you sure macro security is set low enough to run the macro?
In PowerPoint goto File > Options > Trust Center> Trust Center Settings > protected View and temporarily deselect everything and see if it helps.

BTW

As written your code will normally show the same sequence of slides.

TRY:

Sub JumpToRandomSlide()

Dim SldRng As Integer
Dim SldStart As Integer

'Number of slides in the range
SldRng = 20

'First slide in that range
SldStart = 20

'Do It
Randomize
SlideShowWindows(1).View.GotoSlide _
Int(Rnd* SldRng) + SldStart

End Sub

Probably worth saying how sldRng is defined because it doesn't look like the correct formula for a random slide