Results 1 to 9 of 9

Link VBA Code to Button to transfer data (Run time error)

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-13-2014
    Location
    Three Rivers
    MS-Off Ver
    365
    Posts
    129

    Link VBA Code to Button to transfer data (Run time error)

    Hi

    I hope someone can help as I am new to VBA.

    I need help to link VBA code to a button that will transfer data from a specific row in the "DB" sheet back to the "Input" sheet when you click the "Loan Input" button.

    I have the following VBA code in "module3" but I get an error when I link it to the button (I have also attached the workbook) :

    Sub RoundedRectangle1_Click()
    Application.ScreenUpdating = False
    If Target.Column = 1 Then
    Sheets("Input Sheet1").Cells(4, 3) = Sheets("DataBase").Cells(Target.Row, 2)
    Sheets("Input Sheet1").Cells(6, 3) = Sheets("DataBase").Cells(Target.Row, 3)
    Sheets("Input Sheet1").Cells(10, 3) = Sheets("DataBase").Cells(Target.Row, 5)
    Sheets("Input Sheet1").Cells(12, 3) = Sheets("DataBase").Cells(Target.Row, 6)
    Sheets("DataBase").Rows(Target.Row & ":" & Target.Row).Delete
    'Application.Calculate
    Sheets("Input").Activate
    End If
    End Sub

    When I do link it to the "Loan Input" button I get an Run time error '424': object required

    Thank you in anticipation
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Link a print and Save As Code to one button?
    By countryred in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-03-2014, 02:29 AM
  2. [SOLVED] Run time error in code that extracts data from several sheets into master sheet
    By Hello23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2012, 10:11 PM
  3. Auto. Transfer error code to next sheet (Excel 2007)
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2012, 07:37 AM
  4. First timer command button link - compile error expected end sub
    By MONSIRET in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2012, 08:34 AM
  5. How does this code link to the main report (at the press of a button)
    By slay0r in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-28-2012, 11:45 AM

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