I am trying to create 2 Userforms that will work together to display cells from a Worksheet, based off the the information provided on the Forms.
The first Userform I have works how I want it to.
It searches the Workbook for the Names for just about every sheet and populates the ListBox with those values
Where I am having trouble is passing the selected Name to the next Userform. My hope is to populate the next Userform with values from cells that are in the Sheet that was selected in the first Userform.
The following is the code I have for when the user clicks the Next button that will bring up the next Userform. This is also where I get errors.
The first Userform I have works how I want it to.
It searches the Workbook for the Names for just about every sheet and populates the ListBox with those values
Code:
Sub UserForm_Initialize()
Dim N As Long
For N = 4 To ActiveWorkbook.Sheets.Count
TrackList.AddItem ActiveWorkbook.Sheets(N).Name
Next N
Where I am having trouble is passing the selected Name to the next Userform. My hope is to populate the next Userform with values from cells that are in the Sheet that was selected in the first Userform.
The following is the code I have for when the user clicks the Next button that will bring up the next Userform. This is also where I get errors.
Code:
Public sMeet As String
Public Assc As Boolean
Public Meet As Worksheet
Sub NextB_Click()
sMeet.Value = TrackList.Value
If AsscED = True Then
Assc = True
ElseIf AsscOTB = True Then
Assc = False
End If
Set Meet = Worksheets(sMeet)
Unload Me
DateForm.Show
End Sub