Results 1 to 2 of 2

Run time error in VBA Excel 2019

Threaded View

  1. #1
    Registered User
    Join Date
    01-10-2022
    Location
    Beirut
    MS-Off Ver
    2019
    Posts
    2

    Post Run time error in VBA Excel 2019

    hi, need help pls

    i have a sheet run well on Excel 2019 and i have this message error:
    Run-time error '-2147024809 (80070057)'

    i have problem with yellow mark on VBA when i add a new data from UserForm:

    If IsNumeric(Me("emp" & DataCol)) Then


    and this is the code below :
    'Fill Data in Excel Sheet
    
    With Sheet2
    .Range("A4") = "=Iferror(Max(empid)+1,1)"
    Me.emp1 = .Range("A4").Value
    'Check Form for all field are filled
    If Me.emp2 = Empty Then
    MsgBox ("Employee Name is Mandatory")
    Exit Sub
    End If
    'Fill Data in Excel Sheet
    LastAvailRow = .Range("E99999").End(xlUp).Row + 1
    .Range("E" & LastAvailRow) = Val(Me.emp1)
    For DataCol = 2 To 29
    If IsNumeric(Me("emp" & DataCol)) Then
    .Cells(LastAvailRow, DataCol + 4) = Val(Me("emp" & DataCol))
    Else
    .Cells(LastAvailRow, DataCol + 4) = Me("emp" & DataCol)
    End If
    Next DataCol
    Me.EmpNewBtn.Visible = True
    Me.EmpUpdBtn.Visible = True
    Me.EmpCanBtn.Visible = False
    Me.EmpSaveBtn.Visible = False
    Unload Me
    Employee_Management.Show
    End With
    End Sub
    thank you an advance
    Last edited by davesexcel; 01-12-2022 at 02:10 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Import_mail function gives error on office 2019
    By gicchesto in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2021, 11:42 AM
  2. Replies: 4
    Last Post: 11-02-2019, 08:54 PM
  3. [SOLVED] VBA (or function) to turn a date into a number i.e 12/31/2019 to 2019.12
    By lynnsong986 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-23-2019, 03:56 PM
  4. macro works in excel 2019 but not in 2010 this gives type mismatch error 13
    By Newbikonob1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2019, 06:25 AM
  5. Excel 2019 Bible Error? Filling gaps in imported report
    By jes269 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-30-2019, 06:23 PM
  6. Reflect TBF vacancies over 2018-2019/2019-2020 budget year
    By jennah63 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2019, 07:32 PM
  7. Replies: 4
    Last Post: 12-22-2018, 02:09 PM

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