Ozgrid Excel Help & Best Practices Forums

Excel Training / Excel Dashboards Reports

Results 1 to 3 of 3

Thread: what does vbnullstring do?

  1. #1
    Join Date
    30th June 2004

    what does vbnullstring do?

    I "stole" this format from an old thread.......It has to check if the dateformat is correct in the textbox......does the job perfect.....just for my understanding....what does the first equation do? Don't get this nullstring?

    Private Sub txtbRolldate_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    'checks if the date is the right format
    If txtbRolldate = vbNullString Then Exit Sub
    If Not IsDate(txtbRolldate) Then
        MsgBox "Invalid date format. Please use 'dd-mm-yy' only"
        txtbRolldate = vbNullString
        Cancel = True
        txtbRolldate = Format(txtbRolldate, "dd-mm-yy")
    End If
    End Sub

    Excel Video Tutorials / Excel Dashboards Reports

  2. #2
    Join Date
    11th August 2004
    if nothing has been entered into the text box, exit the sub and presumably the user can try again. vbNullString is a built-in vb constant which is used to check for any empty string.

    Excel Video Tutorials / Excel Dashboards Reports

  3. #3
    Join Date
    30th June 2004
    thank you very much........helped on my understanding

    Excel Video Tutorials / Excel Dashboards Reports

Thread Information

Users Browsing this Thread

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

Possible Answers

  1. Vbnullstring: Runtime Error -2147417848
    By Andy Hennig in forum EXCEL HELP
    Replies: 9
    Last Post: April 3rd, 2007, 04:38


Posting Permissions

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