Option Explicit Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 'メイン Private Sub userform_initialize() Call 表示 End Sub '表示 Sub 表示() '乱数発生 Randomize Dim 行番号 As Long Dim 乱数 As Long 行番号 = Worksheets("sheet1").Range("a65536").End(xlUp).Row 乱数 = Int(Rnd * 行番号) + 1 Label1.Caption = Cells(乱数, 1).Value Sleep (1000) Label1.Caption = Cells(乱数, 2).Value End Sub