Hide close [X] button on excel vba userform for my progress bar

前端 未结 6 1479
面向向阳花
面向向阳花 2020-12-28 09:27

I created a userform to show a progress bar when the macro is still importing sheets \"enter

6条回答
  •  悲哀的现实
    2020-12-28 10:00

    A useful way to disable the button is to do the following:

    Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
        If CloseMode = 0 Then Cancel = True
    End Sub
    

    Although this doesn't get rid of the button, but it does make clicking on it accomplish nothing.

提交回复
热议问题