+ Reply to Thread
Results 1 to 3 of 3

need help editing data with a userform.

  1. #1
    Registered User
    Join Date
    07-29-2015
    Location
    Glasgow
    MS-Off Ver
    2010
    Posts
    5

    need help editing data with a userform.

    Hello.
    I am a Business Development Coordinator for the Scottish Prison Service and have currently been tasked to create Dashboards for different areas. Whilst implementing some of these Dashboards I realised that some of the users aren't too familiar with packages, so in order for my Dashboards to be user-friendly for data entry i have started to use User Forms. However, in one of my forms i can't get part of it to work properly.

    In my form i have text boxes, combo boxes, option buttons and a list box. when i enter data into the text boxes etc. and press add, it adds the data to a table. the list box is used for a search button so that when i type into a text box some data and press search it uses criteria and populates the list box appropriately. when i double click the data in the list box it populates the text boxes etc in the user form so that i can edit things that need to be edited. However, when i press the Edit button it gives me "An Error has occurred The error number is:91 Object variable or With block Variable not set".

    The only thing that is bugging me is that i have used the exact same code for another form using the exact same format and the exact same names for the text boxes etc. but i just can't seem to get it to work.

    i have attached an example file to look at for anyone to help me please ?
    Attached Files Attached Files

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: need help editing data with a userform.

    Maybe add
    Please Login or Register  to view this content.
    in your cmdEdit_Click sub?
    Not sure if this solves it, but, it stopped the error from coming up.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Registered User
    Join Date
    07-29-2015
    Location
    Glasgow
    MS-Off Ver
    2010
    Posts
    5

    Re: need help editing data with a userform.

    thanks for your reply gmr4evr1,

    this did take away my error, although now when i click edit it adds a new entry rather than overwriting the original data. do you know how to fix this ? also in my userform the "Time in" and "Time out" fields, do you know how i can get them to show up as a time format in the list box and the userform as they are just showing up as a number format just now ?

    would it help if i attached the other file that i use with pretty much the same coding that actually works the way i want it to work ?
    Last edited by Kvasir15; 09-14-2015 at 02:19 PM.

+ 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. Populating My Userform Boxes with the Data I'm Editing
    By cmoore24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2015, 09:28 AM
  2. Editing Userform Data
    By cmoore24 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-20-2015, 09:42 AM
  3. Userform Data Entry (and editing previous data and generating report)
    By chubbyjenz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-25-2014, 11:43 AM
  4. Editing data in userform and transferring back into row it came from
    By NellieNoggs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2014, 06:53 AM
  5. Loading and Editing Data from Userform
    By Gazmon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2013, 07:49 PM
  6. Editing & replacing worksheet data using VB userform
    By Beam_me_up in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-09-2012, 06:22 PM
  7. Editing Data Through A Userform
    By WoodsyMP5K in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2012, 02:30 AM

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