+ Reply to Thread
Results 1 to 5 of 5

VBA to extract userform information to a worksheets

  1. #1
    Forum Contributor
    Join Date
    09-13-2013
    Location
    Saudi Arabia
    MS-Off Ver
    2010, 2013
    Posts
    192

    Cool VBA to extract userform information to a worksheets

    Hai Again,

    Required help to export data from listbox, Combobox & 2 textboxes from userform to worksheet.

    User search a provider which is available on Data worksheet and unique items listed in listbox.
    User have to select that item and from dropdown.
    User have to enter start date and end date.

    Header D information automatically copies based on Header E which is selected on listbox.
    The other information which user entered or select from above controls will be send to worksheet.

    Copy of expecting result is attached for your reference.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: VBA to extract userform information to a worksheets

    Hi,

    See the modified copy of your Sample Workbook which contains the following modifed code in the UserForm code module:
    a. ItmDescSearch_Click() - modified the code to include the 'Provider Code' in the ListBox as a hidden item.
    b. CommandButton5_Click() - Added code to implement 'Export'.

    Please Login or Register  to view this content.
    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). https://www.excel-easy.com/vba/examp...-explicit.html

    Lewis

  3. #3
    Forum Contributor
    Join Date
    09-13-2013
    Location
    Saudi Arabia
    MS-Off Ver
    2010, 2013
    Posts
    192

    Re: VBA to extract userform information to a worksheets

    Thanks Lewis for response to my request.

    I cannot post any comments on this site since 2days.

    Whoever it is working through my mobile.

    Can we add a validation if a user skip or did not fill any fields the a message will be populated saying that (Field name) cannot be felt blank.

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: VBA to extract userform information to a worksheets

    Your welcome.

    I think I fulfilled your request with the following major changes:
    a. I modified the UserForm slightly to add a 'Status' Label.
    b. I disabled the 'X' at the top right of the UserForm.
    c. I modified CommandButton5_Click() in the UserForm module to check the values in the UserForm.
    d. Major Modification to ordinary code module 'ModProviderSearchUserForm' was 'Module1'.

    NOTE: You have to set Columns 'D' and 'E' on the Spreadsheet Output sheet to the proper Date Format you want displayed.


    See the attached file which contains the following excerpted modifed code.

    In the UserForm code module:
    Please Login or Register  to view this content.
    In Ordinary Code Module ModProviderSearchUserForm:
    Please Login or Register  to view this content.
    Lewis

  5. #5
    Forum Contributor
    Join Date
    09-13-2013
    Location
    Saudi Arabia
    MS-Off Ver
    2010, 2013
    Posts
    192

    Re: VBA to extract userform information to a worksheets

    Thanks Lewise.

    It is working as per my requirement.

+ 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] VBA Extract Information from Specific Worksheets, Dynamically, into a Master Sheet
    By Suggettm in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-08-2019, 04:30 PM
  2. [SOLVED] Extract Invoice Information from Source Data Sheet to Individual Worksheets
    By HangMan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2015, 11:37 AM
  3. Posting different bits of information from userform to different worksheets.
    By Ph0enix in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-24-2015, 03:16 AM
  4. [SOLVED] Information from userform overwriting data previously entered by same userform
    By ciresuark in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-20-2015, 02:10 PM
  5. gather information from different worksheets to a userform listbox and change it
    By ncaravela in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2013, 12:32 PM
  6. Userform macro that will upload information to multiple worksheets
    By ExcelHacks_99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2013, 11:09 AM
  7. Extract information from multiple worksheets using multiple criteria
    By Mbutler132000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2010, 06:17 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