Results 1 to 5 of 5

why the amend code is not working?..any help pls?

Threaded View

  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    davao city philippines
    MS-Off Ver
    Excel 2007
    Posts
    25

    why the amend code is not working?..any help pls?

    I ALREADY REVERSE THE CODE BUT STILL IT AIN'T WORKING..MY AMEND BUTTON WORKS AS DATABASE UPDATE AND THE INPUT/EDITED DATABASE TRANSFERED TO IT'S CORRESPONDING COLUMN..
    combobox9 -> column A
    combobox1 -> column B
    combobox8 -> column C
    textbox28 -> column D
    textbox2 -> column E
    textbox3 -> column F
    combobox4 -> column G
    textbox24 -> column H
    textbox25 -> column I
    textbox26 -> column J
    textbox5 -> column K
    combobox7 -> column L

    PLEASE HELP ME...

    Private Sub CommandButton6_Click()
    
    Dim rng As Range
    Dim r As Long
    
    
       Application.ScreenUpdating = 0
        On Error GoTo exitsub
          Application.ScreenUpdating = 0
            If Me.ComboBox9.Value = "" Then
               Unload Me
               Exit Sub
            End If
        With Sheets("DATA")
           Set x = .Range("A2:A" & .Cells(.Rows.Count, 0).End(xlUp).Row).Find(What:=Me.ComboBox9.Value, LookIn:=xlValues, _
                        LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
                        MatchCase:=False, SearchFormat:=False)
        End With
    
        x.Value = Me.ComboBox9.Value          ' write amendments to database
        x.Offset(0, 1).Value = Me.ComboBox1.Value
        x.Offset(0, 1).Value = Me.ComboBox8.Value
        x.Offset(0, 2).Value = Me.TextBox28.Value
        x.Offset(0, 3).Value = Me.TextBox2.Value
        x.Offset(0, 4).Value = Me.TextBox3.Value
        x.Offset(0, 5).Value = Me.ComboBox4.Value
        x.Offset(0, 6).Value = Me.TextBox24.Value
        x.Offset(0, 7).Value = Me.TextBox25.Value
        x.Offset(0, 8).Value = Me.TextBox26.Value
        x.Offset(0, 9).Value = Me.TextBox5.Value
        x.Offset(0, 10).Value = Me.ComboBox7.Value
    
                
            
    
            ComboBox9.Enabled = True
            ComboBox1.Enabled = True
            ComboBox8.Enabled = True
            TextBox28.Enabled = True
            TextBox3.Enabled = True
            ComboBox4.Enabled = True
            TextBox24.Enabled = True
            TextBox25.Enabled = True
            TextBox26.Enabled = True
            TextBox5.Enabled = True
            ComboBox7.Enabled = True
    
            
        
        If Data.AutoFilterMode Then Data.ShowAllData
        Data.Activate
       
    exitsub:
       Application.ScreenUpdating = 1
    
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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