top of page

​ワークシート

理科

​PowerPoint 

マクロでランダム並び替えができます。

Sub 並び替える()

 
  Dim sld As Long
  Dim cnt As Long
  Dim i As Long
 
  cnt = ActivePresentation.Slides.Count
  If cnt < 2 Then Exit Sub
 
  ActiveWindow.ViewType = ppViewSlideSorter
  Randomize
 
  For i = 1 To cnt
    sld = Int((i * Rnd) + 1)
    ActivePresentation.Slides(sld).Select
    ActiveWindow.Selection.Cut
    ActivePresentation.Slides(cnt - 1).Select
    ActiveWindow.View.Paste
  Next i
 
End Sub

bottom of page