How do I get UserForm data into two worksheets?

benjybl

New Member
Joined
Jul 28, 2011
Messages
1
Hi there,

This is my first post here, and I'm hoping the community can help me!

I'm using a UserForm in Excel 2003 to collect data and input it into a worksheet. Before seeing the UserForm, the user is prompted to choose which worksheet (there are three: North America, Europe, and Asia) is to be used. The CommandButton simply selects which worksheet is to become active, and launches the UserForm.

So far so good.

The UserForm then deposits the data into the proper cells, which is great. But what I now want is to summarise ALL data into a "Summary" worksheet. That is to say, I want the UserForm to copy the data into two worksheets, the region-specific one and the Summary one.

My code is as follows:

Code:
Private Sub cmdSubmit_Click()
   
    
    Range("A11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = tbxAirline
    tbxAirline = Empty
    
    Range("B11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = tbxAirport
    tbxAirport = Empty
    
    Range("E11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = cboxLoungeType
    cboxLoungeType = Empty
-----------------------------------------------
    
    If AllianceStar.Value = True Then
    Range("D11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = "Star Alliance"
    
End If
        
    If AllianceOneworld.Value = True Then
    Range("D11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = "oneworld"
    
End If

----------------------------------------------
    
Range("R11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = tbxOtherFood
    tbxOtherFood = Empty
    
Range("T11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = tbxNotes
    tbxNotes = Empty
    
 If chkHotFood.Value = True Then
    Range("G11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = "Yes"
Else: Range("G11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = "-"

End If

 If chkALaCarte.Value = True Then
    Range("H11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = "Yes"
    
    Else: Range("H11").Select
    Do Until ActiveCell.Value = ""
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    ActiveCell.Value = "-"
End If

As you can see, I have the macro set to determine the next ActiveCell and deposit the responses there. How would I get that data copied over to the Summary database worksheet as well, so that no matter which worksheet in which the data is recorded (i.e. NA, Europe, Asia), the macro will choose the next appropriate row/cell in the Summary database worksheet and record the data there?

Does this make sense? I know I'm rambling a bit and it makes sense in my head..

Thanks so much for all your help!!!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top