Hello all,

I am building a very basic model and have thus far managed with finding code online to program my macros. However, now that I've added a UserForm into my model I am a bit lost.

My model basically has 32 named ranges that contain strings of information. I need to create a matrix now of these 32 variables for 8 different scenarios or symptoms the user might be looking at.

I have managed to create a UserForm with a ComboBox for the 8 Symptoms that you can save these different named ranges to. However, my difficulty is coming from coding the Button that will add the data currently in the model into a said scenario.

The 32 variables are on three separate worksheets, and in my summary table I added strings of the named ranged thinking I could use the indirect function, then copy and paste values to store appropriately. However, it seems the indirect function and selecting cells is not possible from the UserForm, as I continue to get errors.

This is the code I have for the button so far, any enlightenment would be much appreciated! Thank you!

Private Sub AddSymptom_Click()


' Function finds where to add the information into the Holistic Cloud
'MsgBox (ActiveSheet.Name)
Dim ws As Worksheet
Set ws = Worksheets("Holistic Cloud Builder")

' Set up a range variable so that you can add values to the Holistic Cloud builder
Dim activeRange As Range

' Figure out what sheet is calling the function and which appropriate range should be used
' currrange is a named range from the workbook for the variables found on a particular worksheet.
Dim currws, currrange As String
currws = ActiveSheet.Name


Dim rowOffset, colCount As Integer
' colCount is equivalent to the number of named variables in a said range; each range/worksheet has a different and specific number of variables

If currws = "TwelveQs" Then
currrange = "TwelveQs"
colCount = 13
ElseIf currws = "Conflict Diagram (Cloud)" Then
currrange = "Cloud"
colCount = 5
ElseIf currws = "Surfacing the Assumptions" Then
currrange = "Assumptions"
colCount = 14
End If

'MsgBox (Me.Symptom.Value)

rowOffset = ws.Cells.Find(What:=Me.Symptom.Value, searchorder:=xlRows, searchdirection:=xlPrevious, _
LookIn:=xlValues).Row




End Sub