无法将宏添加到功能区

时间:2018-07-26 19:37:28

标签: excel vba excel-vba

我创建了一个宏,将分钟转换为HR:MM格式。但是,当我尝试将此宏添加到功能区时,在“宏”选项卡下看不到该宏。谁能帮我。

Private Sub CommandButton1_Click()
Dim a As Integer
Dim b As Integer
Dim c As Integer

If TextBox1.Value = Empty Then

    MsgBox "You did not enter any value", vbCritical, "No entry"

Else

    a = TextBox1.Value * 7
    b = WorksheetFunction.Quotient(a, 60)
    c = a - (b * 60)

    TextBox2.Value = b
    TextBox3.Value = c

End If

End Sub

0 个答案:

没有答案