Transfer data between sheets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ZakeerSharief
    New Member
    • Jan 2012
    • 17

    Transfer data between sheets

    Hi Guido,

    Please provide me the code for tranferring the data between sheets. It is little urgent. I didnt know how to open a new call. Is that correct what i am doing. Please help me in solving this.

    Thanks,
    Attached Files
  • Guido Geurs
    Recognized Expert Contributor
    • Oct 2009
    • 767

    #2
    This call is OK.
    You can use arrays to transfer data from one sheet to an other in a fast way.

    I have some questions and I need more help for this project (I need to know what you exactly want as end result):
    - does all the data sheets have the same columns (number , titles)
    - is it possible to attach an example of the result you want?
    Like "sheet total" with the columns and an example of the data.

    Comment

    • ZakeerSharief
      New Member
      • Jan 2012
      • 17

      #3
      Hi, How is that possible with arrays. Do i have to store all the data in the array first.

      My end result should be i should be able to see all the data of which selected under Frame1_1.

      Yes every sheet has same format of data, but columns might be increased.

      Will this help.

      Comment

      • ZakeerSharief
        New Member
        • Jan 2012
        • 17

        #4
        I have attached a example file. Once button "Go" is clicked then i should get a another user form where the data should be pulled from different sheets according to the number of checkboxes checked under "Frame_1. And above each textboxes in the userform2, there is label in each column, it should fetch the name the checkboxes which is checked.

        Thanks,
        Attached Files

        Comment

        • Guido Geurs
          Recognized Expert Contributor
          • Oct 2009
          • 767

          #5
          Sorry but I still don't understand how the result must be.
          This is not transfer data between sheets!
          If you want the results in a form, how is it possible to put all the data (see attached picture "data_v2.gi f") in 8 fixed textboxes ?
          Is it possible to attach a screen capture how the result must be ?
          I have attached an example userform1_v2.gi f and userform2_v2.gi f (possibly wrong but an impression how you can explain what you want)
          Attached Files

          Comment

          • ZakeerSharief
            New Member
            • Jan 2012
            • 17

            #6
            Hi, I wanted the data to be displayed in the form(Final Result). The data is present in various excel sheets, according to the number of checkboxes checked it should display the data. The data in the sheets are formatted as a table, with number of rows in various sheets, only the columns might increase.

            What i have done is, when the checkboxes above are selected, those checkboxes names would be displayed in the frame below(Frame_1_1 & Frame_1_2). In the middle of the code what i have done is, i have fetched the data into the textboxes using "Sheet1.Range(" A1")". Then in the next form i display only the data of checkboxes which are checked under Frame_1_1 & Frame_1_2. Is there any other way do this.

            Thanks,

            Comment

            • Guido Geurs
              Recognized Expert Contributor
              • Oct 2009
              • 767

              #7
              This is how it can be done.
              I don't think it's a good idea to use checkboxes because the number of sheets and columns can change.!
              Therefore I have used listboxes with check indicators.
              The user can only select 2 sheets.
              If he want to change his selection: deselect the wrong selected sheet first.
              I have also changed the titles and data just for checking if the right data is transfered between the sheets.
              I think it's not wise to transfer the data to a form: problems if there is a lot of data to see, so I have dumped the data in the first sheet.
              Attached Files

              Comment

              • ZakeerSharief
                New Member
                • Jan 2012
                • 17

                #8
                Thanks alot for your response. I shall try and execute this in my project. And it was correct when forms is used to display the data. If data increases the forms size also increases. Thanks for your valuable time. I will get back if i have any other queries.

                Thanks,

                Comment

                • ZakeerSharief
                  New Member
                  • Jan 2012
                  • 17

                  #9
                  Hi, I have a query. Would it be possible for you to change the below code for the checkboxes instead of listboxes.

                  Private Sub UserForm_Activa te()
                  Dim SHEETSidx As Integer
                  For SHEETSidx = 2 To Sheets.Count
                  ListSheets.AddI tem Sheets.Item(SHE ETSidx).Name
                  Next
                  Com_Next.Enable d = False
                  ListSheets.Mult iSelect = fmMultiSelectMu lti
                  ListAttributes1 .MultiSelect = fmMultiSelectMu lti
                  ListAttributes2 .MultiSelect = fmMultiSelectMu lti
                  End Sub

                  It will be a great help for me.

                  Thanks,

                  Comment

                  • ZakeerSharief
                    New Member
                    • Jan 2012
                    • 17

                    #10
                    Hi, Is there any way that if the new sheets are added it will automatically add the checkboxes. As you have done it for list boxes.

                    Comment

                    • Guido Geurs
                      Recognized Expert Contributor
                      • Oct 2009
                      • 767

                      #11
                      There are 3 ways to work:

                      1- with the listbox as checkbox layout(see previous demos)
                      flexibility: no limitations for the number of checkpoints.
                      code: very simple.

                      2- fixed checkboxes (see previous demos)
                      flexibility: limitation for the number of checkpoints. The checkboxes must be placed on the form in VBA environment (limited place)
                      code: more complex for tracing which checkbox is clicked (no indexes).

                      3- dinamic placed checkboxes
                      flexibility: limitation for the number of checkpoints (limited place). The checkboxes are placed on the form at runtime.
                      code: most complex for tracing which checkbox is clicked (no indexes) and the events must be coded in a class environment.

                      Comment

                      Working...