Results 1 to 17 of 17

Capture data from OptionBox into datasheet

Threaded View

  1. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Capture data from OptionBox into datasheet

    I'm a bit confused, what type of control are you using? OptionButton? ComboBox? ListBox?

    It looks like you have most of what you want. Without testing the code I see a couple of things you might want to change. You need to qualify which cells you want to place the values in, and what you'd like to change about the cells. Like:
    Cells(nr, 3) = Me.boxSurname.Text
    ssheet.Cells(nr, 4).value = Me.boxForename.Text
    ssheet.Cells(nr, 6).value = Me.boxPhone.Value
    ssheet.Cells(nr, 9).value = Me.boxDob.Value
    ssheet.Cells(nr, 16).value = UCase(Me.boxoptout.Text)
    MsgBox "Employee Added"
    e/ On your second question, if you use unload.me to close the userform, I believe it will reset all controls in the userform.
    Last edited by Solus Rankin; 08-21-2013 at 04:28 PM.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Return data to datasheet when checkbox in the form is checked
    By Apple Ling in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-14-2013, 02:09 AM
  2. need help to get data from datasheet on to the userform
    By shankar.nstl in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-04-2011, 06:12 AM
  3. how to update data from one datasheet to a master sheet, automatically
    By mikej2009 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-31-2010, 11:09 PM
  4. Replies: 2
    Last Post: 02-19-2010, 02:59 AM
  5. [SOLVED] Saving data to a form datasheet
    By University of Maine student in forum Excel General
    Replies: 0
    Last Post: 03-14-2006, 04:50 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