msgbox asking for user input in specific format

前端 未结 3 455
我寻月下人不归
我寻月下人不归 2021-01-21 13:16

I\'m trying to write a quick little macro that asks the user for an input, and then copies this to a specific cell (B14 in Sheet1). Here\'s what I\'ve got so far:



        
3条回答
  •  抹茶落季
    2021-01-21 13:34

    Sub updatesheet()
        Dim vReply As String
        Do
            'edit: added UCase on INputBox
            vReply = UCase(InputBox("Enter period (format: Q4 2010) to update, or hit enter to escape"))
        Loop Until Len(vReply) = 0 Or vReply Like "Q# ####"
        If vReply = vbNullString Then Exit Sub
        'continue...
    End Sub
    

提交回复
热议问题