Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target, Range("D1:G16").CurrentRegion) Is Nothing Then Exit Sub With Main_Form ' .txtAmsID = Cells("D15") 'Main_Form.txtAmsID = Cells(Rows.Cells, "D15") .txtAmsID = Sheets("Sheet2").Cells(Target.Row, "D") Main_Form.Show End WithEnd Sub
If you expand the “Full Biography” section of my profile you’ll find links to some articles I’ve written that may interest you.
Marty - Microsoft MVP 2009 to 2017
Experts Exchange Most Valuable Expert (MVE) 2015, 2017
Experts Exchange Top Expert Visual Basic Classic 2012 to 2017
Experts Exchange Top Expert VBA (current)
Microsoft Excel
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.
Open in new window