Hi all,
I am stumped, hope someone can help me.
I have a userform1 that pop's up and you enter some information in TextBox4. The value from TextBox4 will be copied in cell ("AI18"), if the text has met a specific criteria which is calculated in ("AJ20") an additional userform2 will open where you add more info into TextBox15 and this will then be copied in an adjacent cell i.e. ("AJ18").
here is the code for TextBox4from userform1
Private Sub TextBox04_Change()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Sheets("Sheet1")
ws.Activate
ws.Range("ai18").Value = over04.TextBox04.Text
If ws.Range("ai20").Value = "x" Then
over04eb411.Show
End If
End Sub
this is the code for TextBox15 from userform2
Private Sub TextBox15_Change()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Sheets("Sheet1")
ActiveCell.Offset(0, 1) = over04eb411.TextBox15.Text
End Sub
Now, my problem that I have is, when I run userform1 and add the info in TextBox4 userform2 pops up, which is correct. but when I add the info to TextBox15 from userform2it does not copy the info to ("AJ18"). BUT when I run userform2 directly from VB Editor it works? what am I doing wrong
Bookmarks