+ Reply to Thread
Results 1 to 3 of 3

Add Customized MsgBox

  1. #1
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Add Customized MsgBox

    All,

    I need help please!!!! I have a working userForm with text fields and two buttons (Add Data / Cancel) to add data to a worksheet. What I would like is when the user clicks the Add Data button, a msg box appears with two more buttons. I would like the msg box to ask "Do you want to add more data?" and give them Yes or No Options where Yes takes them back to a BLANK Userform and No basically closes the UserForm. Is this something that can be done? If so, what's the code to get this to work?

    Thank you very much!!!

    ___________________________________________________________

    Private Sub AddDataButton_Click()

    ActiveWorkbook.Sheets("Course Bookings").Activate
    Range("A10").Select
    Do
    If IsEmpty(ActiveCell) = False Then
    ActiveCell.Offset(1, 0).Select
    End If
    Loop Until IsEmpty(ActiveCell) = True

    ActiveCell.Value = YearInput.Value
    ActiveCell.Offset(0, 3) = CompanyInput.Value
    ActiveCell.Offset(0, 6) = CommentsInput.Value
    ActiveCell.Offset(0, 8) = DocNumInput.Value
    ActiveCell.Offset(0, 9) = DocDateInput.Value
    ActiveCell.Offset(0, 10) = DescriptionInput.Value
    ActiveCell.Offset(0, 11) = CategoryInput.Value
    ActiveCell.Offset(0, 15) = TotalAmountInput.Value

    Range("A10").Select


    End Sub
    ___________________________________________

    Private Sub CancelButton_Click()
    Unload Me
    End Sub

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Add Customized MsgBox

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Woodbridge, Virginia
    MS-Off Ver
    Excel 2010
    Posts
    111

    Re: Add Customized MsgBox

    Thank you very much!!!!!!!!!!!!!!!!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1