+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : updating data to another sheet with update command button

  1. #1
    Registered User
    Join Date
    05-01-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    updating data to another sheet with update command button

    Hi to all!

    Fisrtly,I want to update, filled in data on Invoice template to my sheet(InvoiceData).
    Secondly, My invoice numbers should be increased automatically after updating.
    Thirdly, I should be able to select customer id, customer details have to appear in relevant cells. Please help
    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: updating data to another sheet with update command button

    You haven't even made a start!

    1. sample code to adapt for transferring data in the contacts form here
    http://excel-it.com/vba_examples.htm
    2.[code]Range("G4").Value=Range("G4").Value+1
    3. Use VLOOKUP based on customer ID#
    http://excel-it.com/excel_functions.htm
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    05-01-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: updating data to another sheet with update command button

    thanks RoyUK

    I don't have any idea about macros, I normally use it as speadsheet only, now i am trying to learn.
    so can you please guide me in details.

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

    Re: updating data to another sheet with update command button

    Start by reading the code in the example.

    The populating names & address can be done with VLOOKUP, no VBA required

  5. #5
    Registered User
    Join Date
    05-01-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: updating data to another sheet with update command button

    can you explain me,
    Please Login or Register  to view this content.
    Last edited by royUK; 05-02-2010 at 06:20 AM.

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

    Re: updating data to another sheet with update command button

    Pleaseuse code tags in future.That line finds the next empty row in the data sheet based on entries in Column A which should be the Invoice number

  7. #7
    Registered User
    Join Date
    05-01-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: updating data to another sheet with update command button

    what modification i have to do from this?

    Private Sub cmdUpdateInovice_Click()
    'Set variables
    Set wsData = Sheet3
    Set wsForm = Sheet1
    'find the next empty row for data input
    Set rNextCl = wsData.Cells(65536, 1).End(xlUp).Offset(1, 0)

    'enter the data using Offset to find next Column
    'note use With....End With to let Excel that the following lines are working with rNextCl
    'also reduces typing!!

    With rNextCl
    .Value = wsForm.Cells(2, 2).Value
    .Offset(0, 1).Value = wsForm.Cells(3, 2).Value
    .Offset(0, 2).Value = wsForm.Cells(4, 2).Value
    .Offset(0, 3).Value = wsForm.Cells(5, 2).Value
    .Offset(0, 4).Value = wsForm.Cells(6, 2).Value
    End With

    'confirm data transferred
    MsgBox "Data transferred successfully" & vbCrLf & "", vbInformation, "Data transfer"

    'clear input cells, note use of Named Range
    wsForm.Range("DataInput").ClearContents

    'clear variables
    Set wsData = Nothing
    Set wsForm = Nothing
    Set rNextCl = Nothing

    End Sub

  8. #8
    Registered User
    Join Date
    05-01-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: updating data to another sheet with update command button

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by murthykr72; 05-04-2010 at 01:24 PM.

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

    Re: updating data to another sheet with update command button

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

  10. #10
    Registered User
    Join Date
    05-01-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: updating data to another sheet with update command button

    HTML Code: 
    Attached Files Attached Files

+ 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