+ Reply to Thread
Results 1 to 2 of 2

Using a Save button to copy particular cells

Hybrid View

joey_cava Using a Save button to copy... 06-01-2010, 10:11 PM
royUK Re: Using a Save button to... 06-02-2010, 01:46 AM
  1. #1
    Registered User
    Join Date
    05-27-2010
    Location
    Melbourne, Austra;oa
    MS-Off Ver
    Excel 2007
    Posts
    7

    Using a Save button to copy particular cells

    Hi,
    I would like to use a save button where it captures particular cells on the user form and inserts them on a separate sheet with also reference to a particular cell. I have attached an example which is just a little extract on a big userform. Help would be greatly appreciated, even if it is some code to capture just one of the cells, than i can repeat the process for the remainding cells
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Using a Save button to copy particular cells

    Try to use correct terms,this is not a userform. It is a sheet acting as a form.

    It's not clear what you want. Do you want to add values from the form to existing values? So if the form contains 5 & the data sheet has 10,the datasheet becomes 15
    
    Option Explicit
    
    Private Sub CommandButton1_Click()
        With Sheet1
            'move value,overwrite existing
            Sheet2.Cells(3, 3).Value = .Cells(3, 3).Value
            'add value to existing
            Sheet2.Cells(3, 3).Value = .Cells(3, 3).Value + Sheet2.Cells(3, 3).Value
            'clear form
            .Cells(3, 3).ClearContents
        End With
    End Sub
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

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