Results 1 to 9 of 9
  1. #1
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: userform formats (2000)

    Your code is written so that whenever you change Textbox1 it fills the items with the values from the other textboxes. If you have nothing in the other textboxes the cells are cleared.

    Remove the textbox1 change event and it shouldn't do this. What are you trying to do with that code? You can put the code in the event of a command button just rewrite the info only after you press the command button to "confirm" editing or adding.

    Steve

  2. #2
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Kuala Lumpur , MALAYSIA
    Posts
    154
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: userform formats (2000)

    thanks steve for the reply,

    what i want to do is use the userform to fill data..

    let say..in row 1.that is a3..i put number 1..and i will fill continously until the last row nad that is q3..

    then i will move to the next row..and that is a4..iand i will repeat the same operation..

    let say..in the 1st row..in cell b3..i accidentally put awrong speling..and i want to edit it..b4 this..using the same userform and the same coding..in the number box , i will just simply key in number 1..and walla..all the data that i have key in..will apperaed i the userform..so i just select which cell that i've make mistake..and edit it..

    and hit the button.."accept the data" and the mistake will be corrected..

    but in the sample file that i attach..this thing is not happen..

    after i fill the number box..eg..number 1..after i hit enter or tab..all the data in the same row..from a3 to q3..will be deleted automatically..

    thats very weird and i dont know how to fix it..thanks again

  3. #3
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Kuala Lumpur , MALAYSIA
    Posts
    154
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: userform formats (2000)

    if it so compicated to explained steve..do you mind ..adjust my code and give me some sample file ..the way that

    you explained to me at above..i haveno idea to fix this mess..thanks

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: userform formats (2000)

    Your code after the change event writes to the cell what is in the textboxes.

    Why not read the cell contents into the textboxes instead of putting the textbox value into a cell (your code)
    Range("A3").Offset(TextBox1.Value, 0).Value = TextBox1.Value

    Put the cell values into the textbox:
    TextBox1.Value = Range("A3").Offset(TextBox1.Value, 0).Value

    Then they can see and edit and then confirm

    Steve

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: userform formats (2000)

    You do not have the same coding. In the textbox exit of the latest one, you fill the other textboxes with the values from the cells (as I had suggested based on your original post).

    In your original one, you replace the cell contents with the values from (empty) textboxes so you are "clearing the cells"

    Steve

  6. #6
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Cape Town, South Africa, South Africa
    Posts
    399
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: userform formats (2000)

    Have you tried using the DATA - Form function. This is a very quick & easy solution for entering editing & searching data.

  7. #7
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Kuala Lumpur , MALAYSIA
    Posts
    154
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: userform formats (2000)

    thanks to all.cheers

  8. #8
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Kuala Lumpur , MALAYSIA
    Posts
    154
    Thanks
    0
    Thanked 0 Times in 0 Posts

    userform formats (2000)

    Hello again guys.

    I've created a useform..
    It works fine..

    but the problem occured when i want to edit the data..
    it seems that after i enter the number of the pupils in column a ,
    it will automatically delete all the data in the same row..

    what i want to do is edit certain data in the particular rows ,
    but after i fill the number in the item box in column a , let say 1,
    after i hit enter and go to the name column..that is in column b , all the data in teh same row will be deleted automatically..

    how can i overcome this problem..thanks a bunch

    plz refer to attachment

  9. #9
    2 Star Lounger
    Join Date
    Jul 2001
    Location
    Kuala Lumpur , MALAYSIA
    Posts
    154
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: userform formats (2000)

    Thanks steve for the prompt reply..
    but i think that ..you ..dont understand what i'm trying to do..

    for more information , please refer to my new file that i attached

    you see in this file, every time i want to edit the data , i just put the number in the item box..let say #5 and hit enter..

    after the that i can edit it easily..after i hit the accept data button..the correction that i've submit will be appear and yet..the data that i dont want to edit ..remains

    this is really totally different with the one that i post earlier..even though i use the the same coding , i dont get the same result..

    what am i doing wrong..please refer to my new attachment..thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •