1: Private Function getMaxPage() As Long 2: ' 最大ページ数を返す 3: PicDoc.Visible = False 4: 5: getMaxPage = DrawPreview(PicDoc, 1, 65535) 6: 7: If getMaxPage <= 0 Then 8: getMaxPage = 1 9: End If 10: 11: PicDoc.Visible = True 12: 13: End Function