+ Reply to Thread
Results 1 to 3 of 3

Mutiple userform in a workbook that submits data to different sheets within the workbook

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    New Delhi
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    37

    Post Mutiple userform in a workbook that submits data to different sheets within the workbook

    Hi Everyone,

    I want to create a workbook that can have multiple userform (in my case only two) that can submit data to 2 different sheets.

    I have a sample workbook attached for your perusal:

    In sheet1 (Datasheet) you can see that there are two buttons, one's called "Cheque checklist" and the other "OE Checklist".

    I have worked on the "Cheque Checklist" button and is working fine. When i click the button a userform shows up having some textboxes and checkboxes with default values except textbox3 called Mtrack#. What i am doing here is that whenever anybody check the check boxes and submits the data it gets pasted to the sheet1(datasheet) with Yes or No.

    I need help with the the 2nd button "OE Checklist", I have created the Userform for you. What I want here is whenever someone click this "OE Checklist" button fill the userform (which ofcourse only have textboxes, checkboxes & Frames), the data should get submitted to the next sheet called "OE".

    And also I need advice on using more userforms within this workbook in future (if required).

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Mutiple userform in a workbook that submits data to different sheets within the workbo

    What exactly do you need help with?

    If it's to make sure data is read from/written to the correct worksheet all you need to do is make sure you reference the correct worksheet in the code.

    For example, here you have no worksheet reference so the code will be referring to the active sheet.
    Please Login or Register  to view this content.
    If you wanted to refer to the worksheet 'OE' you would use this.
    Please Login or Register  to view this content.
    Note I've changed xlDown to xlUp, because you can't go down from the last row in the worksheet.

    Using xlUp will come from the bottom up and will find the last row with data in column A.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    New Delhi
    MS-Off Ver
    Excel 2003 and 2007
    Posts
    37

    Post Re: Mutiple userform in a workbook that submits data to different sheets within the workbo

    Hi Norie,

    Thanks for a prompt reply.

    What I need is help with the coding....

    For userform1 (addCheckList) I have use the codes which are the simplest in VBA for TextBoxes and checkboxes...
    But, for userform2 (addOracleEditChecklist)I have used Textboxes and Checkboxes which are under different Frames in a userform so, that the user can differentiate which checkBoxes they are working with?

    I being very new to Vba have very little knowledge about how to code checkboxes inside frames?

    One more query, I want my workbook to have the Commandbuttons on sheet1 and the data should submit to some other sheet. for e.g, In the sample workbook the commandbuttons appears in sheet1 (datasheet)and the data from userform1 "addchecklist" under button1 (Cheque checlist)gets submitted to the sheet1 (datasheet) itself. What i want is the Commandbuttons should appear in a blank sheet and the data from the two userforms should get submitted to different sheets say, sheet2 and sheet3 or say datasheet and OE?

    Thanks a lot

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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