+ Reply to Thread
Results 1 to 3 of 3

VBA Tag property. Retrieve data into form and update existing row

  1. #1
    Registered User
    Join Date
    02-28-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    49

    VBA Tag property. Retrieve data into form and update existing row

    Hi,

    I'm in the middle of creating a UserForm that when a user double clicks on a line in a ListView the data is pulled back into the form for the user to edit. This part is working. What I would like to be able to do is once modifed write back to the table but overwrite the existing row with any changes made.
    I have this functionality working from a combox but wanted to give the user both options. I know I have to use the tag property but not sure how to impliment this with a listview.
    example.xlsm

    Any help would be great.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,124

    Re: VBA Tag property. Retrieve data into form and update existing row

    I think what i would do is to change the cmbRetrieve to match the ID of the selected listview.

    Then The cmbRetreive.Tag property would hold the row number.
    Last edited by Tinbendr; 03-11-2014 at 10:20 AM.
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,626

    Re: VBA Tag property. Retrieve data into form and update existing row

    Can't you use the SelectedItem's ListIndex property to get the row number of the data selected in the ListView?
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 10-21-2013, 05:35 AM
  2. [SOLVED] have code need user form to automatically update existing information
    By Jeff up North in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-31-2013, 03:37 PM
  3. User Form to Retrieve then Update specific record
    By jimrood in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2012, 02:03 PM
  4. [SOLVED] Using VB form in MS Excel to retrieve and edit existing information within a workbook
    By Beam_me_up in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-08-2012, 02:26 PM
  5. Automatically update existing data using a Update command button
    By 9999335 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-23-2012, 09:46 PM

Tags for this Thread

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