Results 1 to 3 of 3

Thread: Set Msgbox with Default number?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Set Msgbox with Default number?

    Hi,

    I'm new to VBA programming.

    How do you write the codes for showing an inputbox asking the user to enter a number, but if the user leaves the box blank, Excel will default it to 35? Can someone help?

    I only have these so far:

    Dim Age as Double
    Age = InputBox("Please Enter Your Age" & vbCrLf & "Default: 35")
    Last edited by doctortt; 03-28-2011 at 12:03 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •