Help needed with the developmennt of a user form

stewtee

New Member
Joined
Dec 1, 2005
Messages
2
Ok so I'm new to this and feel relatively stupid :oops:

I have a 4 sheet workbook, 3 sheets that will hold a set of data each, and the fourth that will be used to compile totals.

My task is to develop a VBA powered user form that will enable 3 school-classes to input a simple of data to their own class sheet.

I have been trying to use cascading combo boxes (ie select one option - your class name - and this will open up a combo box that will present the kids names for that class to choose from.) However I have abandoned that idea in favour of the form presenting each class list to allow selection from it. *Here I'm having difficulty referring the combo box to the name choices within the relative work sheet, using a sheet and cell reference technique*

In addition to this I really can't grasp is how to enable the form to write the data onto the correct worksheet. (i.e. the correct cell reference relating to the correct choice and the correct child)

Is this confusing everybody, or do you understand what i'm needing???

I've been trying for ages but am really struggling. Having never been taught much more than basic Excel skills this is really troubling me.

I'm exhausted and am almost ready to pay for a a completed solution!!!! :p

Is there a good soul out there willing to teach me?

Pleeeeeeeeeeaaaaaaaaaaaaasssssssssssssssseeeeeeeeeeeee...........
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
The problem here is that there are so many possible solutions, and your exact requirements are not clear. In project such as this, where recording a macro does not help, it is a good idea to start a subroutine and put commented (apostrophe in front of line) headings of each thing you want to do in turn. Then fill in the code.

This is a general method. In theory, if you use the list of names as source for the combobox you are not going to get "not found". Also you could use 'Private Sub ComboBox1_Change()' instead of a button as here. Hopefully this will get you a bit closer :-
Code:
Private Sub CommandButton1_Click()
    Dim ws As Worksheet
    Dim ComboValue As String
    Dim FoundCell As Object
    Dim FoundRow As Long
    '-------------------------------
    Me.Hide
    Set ws = ActiveWorkbook.Worksheets("Sheet1")
    ComboValue = ComboBox1.Value
    '- find name cell in sheet
    Set FoundCell = ws.Columns("A").Cells. _
        Find(What:=ComboValue, After:=[A1], LookIn:=xlValues, LookAt:= _
            xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False)
    If FoundCell Is Nothing Then
        ' name not found
        MsgBox (ComboValue & " not found")
        Exit Sub
    Else
        '- add data against name
        FoundRow = FoundCell.Row
        ws.Cells(FoundRow, 2).Value = "Something"
        ws.Cells(FoundRow, 3).Value = "Something Else"
    End If
    '-------------------------------------
    '- unload form from memory
    Unload Me
End Sub
 
Upvote 0
Thanks for that.

Sorry for my ignorance, but I guess that this generates the contents of the 'second' combo-box?

What else can I tell you in order to clarify my problem?

Thanks again... I really do struggle to teach myself new things and your help is appreciated.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,192
Members
449,072
Latest member
DW Draft

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