Results 1 to 4 of 4

Thread: iam getting Vba erro1004

  1. #1
    Junior Member
    Join Date
    Dec 2017
    Posts
    1
    Rep Power
    0
    Code:
    Option Explicit
    Private Trial As Long
    [CODE]
    Private Sub cmdCheck_Click()
    'Declare the variables
    Dim AddData As Range
    Dim user As Variant
    Dim Code As Variant
    Dim result As Integer
    Dim TitleStr As String
    Dim Current As Range
    Dim PName As Variant
    Dim msg As VbMsgBoxResult

    'Variables
    user = Me.TxtUser.Value
    Code = Me.TxtPass.Value
    TitleStr = "Password check"
    result = 0
    Set Current = Sheet6.Range("K2")
    'Error handler
    On Error GoTo errHandler:
    'Destination location for login storage
    Set AddData = Sheet6.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0)
    'Check the login and passcode for the administrator
    If user = "Hardy Cross" And Code = 8118425 Then
    MsgBox "Welcome Back:

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    Hi bhandari

    You haven't mentioned which line you get the error.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  4. #4
    Junior Member
    Join Date
    Feb 2018
    Posts
    1
    Rep Power
    0
    Try the given solution to fix solution to fix the error VBA error1004

    1. Right click on the start menu
    2. Then select the Explore option
    3. Then open the following directory – C:\Program Files\MSOffice\Office\XLSTART
    4. Here you need to delete “GWXL97.XLA” file
    5. And open the excel after closing the explorer

    repairmsexcel.com

Posting Permissions

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