Hi,
I have created a userform in that it asks multiple users to identify a row on a worksheet and then I want to analyze and pass some of the data to another worksheet. I have the code below. I'm having trouble obtaining data for the variables "locationcxs" and "details." Any help in steering me in the right direction is much appreciated.
Private Sub UserForm_Initialize()
Dim ws As Worksheet
Dim locationcxs As String
Dim details As String
'Empty CSXBox
CSXBox.Value = ""
'Fill DigComboBox1
With DigComboBox1
.AddItem "2007 ePlanner"
.AddItem "2012 ePlanner"
.AddItem "2007 FRW"
.AddItem "AMS"
.AddItem "ePresentations"
.AddItem "eToolkit"
.AddItem "EMIS"
.AddItem "Examview"
.AddItem "iMRB"
.AddItem "iSRB"
.AddItem "iTLG"
.AddItem "Spanish Resources"
.AddItem "Student Home Page"
.AddItem "Teacher Home Page"
End With
'Set Focus on NameTextBox
CSXBox.SetFocus
Worksheets(1).Activate
End Sub
Private Sub CSXBox_Change()
End Sub
Private Sub DigComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
'Modify print sheet with digital component
On Error Resume Next
Range("A1").Activate
Range("A:A").Find(What:=CSXBox.Value, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 4).Activate
ActiveCell.Value = DigComboBox1.Value & ", " & ActiveCell.Value
ActiveCell.Offset(0, -4).Activate
'Copy CSX# to appropriate digital component sheet
Set ws = Worksheets(DigComboBox1.Value)
ws.Activate
NextRow = Range("A" & Rows.Count).End(xlUp).Row + 1
Range("A" & NextRow).Value = CSXBox.Value
'Copy print correx to appropriate digital component sheet
Worksheets(1).Activate
locationcxs = ActiveCell.Offset(0, 9).Value
ActiveCell.Offset(0, 9).Copy
ws.Activate
Range("B" & NextRow).Value = locationcxs.Value
'Copy print detail correx to appropriate digital component sheet
Worksheets(1).Activate
details.Value = ActiveCell.Offset(0, 10).Value
ActiveCell.Offset(0, 10).Copy
ws.Activate
Range("C" & NextRow).Value = details.Value
Unload Me
End Sub
Private Sub CommandClose_Click()
Unload Me
End Sub
Private Sub Label1_Click()
End Sub
I have created a userform in that it asks multiple users to identify a row on a worksheet and then I want to analyze and pass some of the data to another worksheet. I have the code below. I'm having trouble obtaining data for the variables "locationcxs" and "details." Any help in steering me in the right direction is much appreciated.
Private Sub UserForm_Initialize()
Dim ws As Worksheet
Dim locationcxs As String
Dim details As String
'Empty CSXBox
CSXBox.Value = ""
'Fill DigComboBox1
With DigComboBox1
.AddItem "2007 ePlanner"
.AddItem "2012 ePlanner"
.AddItem "2007 FRW"
.AddItem "AMS"
.AddItem "ePresentations"
.AddItem "eToolkit"
.AddItem "EMIS"
.AddItem "Examview"
.AddItem "iMRB"
.AddItem "iSRB"
.AddItem "iTLG"
.AddItem "Spanish Resources"
.AddItem "Student Home Page"
.AddItem "Teacher Home Page"
End With
'Set Focus on NameTextBox
CSXBox.SetFocus
Worksheets(1).Activate
End Sub
Private Sub CSXBox_Change()
End Sub
Private Sub DigComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
'Modify print sheet with digital component
On Error Resume Next
Range("A1").Activate
Range("A:A").Find(What:=CSXBox.Value, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 4).Activate
ActiveCell.Value = DigComboBox1.Value & ", " & ActiveCell.Value
ActiveCell.Offset(0, -4).Activate
'Copy CSX# to appropriate digital component sheet
Set ws = Worksheets(DigComboBox1.Value)
ws.Activate
NextRow = Range("A" & Rows.Count).End(xlUp).Row + 1
Range("A" & NextRow).Value = CSXBox.Value
'Copy print correx to appropriate digital component sheet
Worksheets(1).Activate
locationcxs = ActiveCell.Offset(0, 9).Value
ActiveCell.Offset(0, 9).Copy
ws.Activate
Range("B" & NextRow).Value = locationcxs.Value
'Copy print detail correx to appropriate digital component sheet
Worksheets(1).Activate
details.Value = ActiveCell.Offset(0, 10).Value
ActiveCell.Offset(0, 10).Copy
ws.Activate
Range("C" & NextRow).Value = details.Value
Unload Me
End Sub
Private Sub CommandClose_Click()
Unload Me
End Sub
Private Sub Label1_Click()
End Sub