Your code looks wrong to me.
It looks like you want to show the userform if columns B or C are selected.
Public Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 2 Or Target.Column = 3 Then
UserForm1.Show vbModeless
UserForm1.TextBox1.Value = Cells(Target.Row, 2).Value
UserForm1.TextBox2.Value = Cells(Target.Row, 3).Value
Else 'this IF statement is unrelated to the two textboxes above
If colnow = 1 Then getURL
End If
End Sub
Double Click on one of the textboxes in Visual basic to open the userform Macro module.
Paste this code in the module and close it.
Private Sub TextBox1_Change()
Cells(ActiveCell.Row, 2).Value = TextBox1.Value
End Sub
Private Sub TextBox2_Change()
Cells(ActiveCell.Row, 3).Value = TextBox2.Value
End Sub
Bookmarks