+ Reply to Thread
Results 1 to 4 of 4

Transfer Data from Userform to Worksheet (Invoice)

  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Transfer Data from Userform to Worksheet (Invoice)

    Dear all,
    I'm trying to transfer values from an userform ComboBoxes, TextBoxes, etc to a worsheet to create an invoice but I don't seem to make it work properly with the following code I have.
    I believe I'm almost there but somehow I cannot get it right and that's may be because I have an issue with the way the controls are formatted.
    The userform in question is Stat_frm and the worksheet where it should be transferred is Inv_doc.
    I'm hoping you could pinpoint where do I get things wrong or written incorrectly so it would work and do what I expect it to do.
    Thank you.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,620

    Re: Transfer Data from Userform to Worksheet (Invoice)

    The file do not open properly as you removed several sheets.
    But briefly looking at your code this:
    Please Login or Register  to view this content.
    looks quite problematic.

    Me.Controls("STB" & i) is by default a value of i-th STB textbox.
    As it is textbox, the value is string.
    So formatting it with as 2digit (with preceedeing zero) is doubtfull - the string will remain as it is.
    Moreover you try to use with on it which requires an object and it's not the case. it's a string ...

    As I said - as the file has sheets removed the code do not work anyway, because it has calls to unavailable sheets
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Transfer Data from Userform to Worksheet (Invoice)

    Thanks. I had to slim it down since it was both really big but also containing sensitive data. I have re-uploaded it, hopefully a clean one.
    I guess the issue I have is the code you mentioned above
    Please Login or Register  to view this content.
    but I believe I can skip the formatting and rename the STB (checkbox) to STB1-STB12.
    However, where I really got stuck is with this formula
    Please Login or Register  to view this content.
    Here what I want to achieve is to have the proper textbox number which I have to start from STM09 to get its value transferred to the worksheet.
    Any help is much appreciated.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Transfer Data from Userform to Worksheet (Invoice)

    Anyone could have a look at this and provide some direction perhaps? Thank you.

+ 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] How to transfer data from UserForm to Worksheet
    By Frigide in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-19-2019, 03:42 AM
  2. [SOLVED] Transfer Data from Userform to Worksheet Table
    By How How in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-10-2017, 04:02 PM
  3. Data Transfer: Userform to Worksheet
    By smartbuyer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-24-2014, 01:15 PM
  4. [SOLVED] Transfer Userform data on 1 worksheet to different worksheet (empty row = wrong sheet)
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2014, 10:08 AM
  5. [SOLVED] Userform transfer data into worksheet
    By kheytli in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2013, 01:09 PM
  6. Replies: 20
    Last Post: 05-24-2012, 10:51 AM
  7. Transfer Data From Userform to Worksheet
    By ScotyB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2012, 07:12 AM

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