' [056.xls] ' [Module1] のコード '★★☆ Excelをタスクバーからも完全に見えなくする ☆★★ Option Explicit Sub start() UserForm1.Show End Sub ' [UserForm1] のコード Option Explicit Private Sub CommandButton3_Click() 'ボタンの文字により現在の Excel の状態を判断 If CommandButton3.Caption = "戻す" Then CommandButton3.Caption = "Excelを完全に見えなくする" Me.Caption = "Excelを見えなくします" 'Excel を表示にする Application.Visible = True Else CommandButton3.Caption = "戻す" Me.Caption = "タスクバーに注目" 'Excel を非表示する Application.Visible = False End If End Sub Private Sub UserForm_Initialize() Me.Caption = "Excelを見えなくします" End Sub Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) 'Excel を非表示にしたまま終了しても元に戻るようにする Application.Visible = True End Sub