+ Reply to Thread
Results 1 to 5 of 5

Update WS from user form

  1. #1
    Registered User
    Join Date
    10-13-2011
    Location
    Jozi, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    93

    Update WS from user form

    Hi all, i have the below code that i am using to update a spreadsheet based on the entries in both check-boxes and text-boxes on a form.

    the check-boxes update just fine, but the text-boxes don't. not sure what i am doing wrong:

    Please Login or Register  to view this content.
    ***------ Coding for Fun ------***

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    12,598

    Re: Update WS from user form

    You may have to supply a sample, for somebody to look at, right now, like you said..it should work

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,635

    Re: Update WS from user form

    If you use Application.Match you never Dim as Long, but as variant because Match can also return an error.

    Please Login or Register  to view this content.
    If you put a Stop point (F9) at the Not Iserror line you can see which value C holds. (maybe control names and headers don't match.)
    Try to avoid the use of On Error Resume Next. The code doesn't stop but you can't also see where the error comes from.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Registered User
    Join Date
    10-13-2011
    Location
    Jozi, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    93

    Re: Update WS from user form

    i put a messgae box to test for row and column and content, all seem right.

    I used:
    Please Login or Register  to view this content.
    .

    if i comment out the line
    Please Login or Register  to view this content.
    , then nothing happens to the excel sheet for sure, but then the form retains all teh values. the minute i re-enable the line, then the forms text boxes loose their value.

    Check boxes are not affected at all.

    this is so weird. i just cannot figure it out.

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,635

    Re: Update WS from user form

    Can u post an example file with your userform and some data to work with ?

+ 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. [SOLVED] User form won't update correctly
    By Jamesera27 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-22-2016, 06:57 PM
  2. User Form Update
    By Yorke181 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-24-2014, 10:52 PM
  3. Replies: 1
    Last Post: 08-28-2013, 05:04 PM
  4. User Form Search and Update
    By jabryantiii in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 02-07-2012, 06:09 AM
  5. Match new password to specific user and update list via custom user form
    By Sargekd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2011, 09:40 AM
  6. Filling form fields via worksheet dropdowns, user update via form, change form color
    By Demosthenes&Locke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2010, 08:58 AM
  7. Update Range from User Form
    By fybar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2006, 08:30 PM

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