Consulting

Results 1 to 4 of 4

Thread: Bypass Run-time error '13'?

  1. #1

    Bypass Run-time error '13'?

    Good morning,

    I know why I get the above error, it appears when a certain field in the userform is empty (the last set of number)

    Is there a way I can by pass this or get around it ?

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,061
    Location
    First impression is fill the field with a value. If its numeric then a zero should suffice.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    If there something in it.. its fine date.JPG is the part of the user form that breaks

    and this is the code to send it to spreadsheet

    .Offset(RowCount, 14).Value = CDate(Me.cboDay3.Value & "/" & Me.cbomonth3.Value & "/" & Me.cboYear3.Value & " " & Me.TextBox3.Value)


    I'm assuming its because I'm asking the VBA to input / when there's a blank entry?


    EDIT: figured a work around.. not ideal.. but ive removed CDate.. and formatted the cell in the workbook. Few rounds of testing and ill need to ensure it pulls a date through correctly.
    Last edited by CuriousGeorg; 09-30-2013 at 03:59 AM.

  4. #4
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,646
    .Offset(RowCount, 14).Value = CDate(cboDay3.Value & "/" & cbomonth3.Value & "/" & cboYear3.Value) + format(TextBox3.Value,"0.0")

Posting Permissions

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