[color=Black]I've looked high and low all over the Internet for hours trying to find an answer but no luck. Keep in mind I'm pretty much a newbie when it comes to VBA so please be nice.
I need to keep 4 columns/cells in lockstep with each other as one of them is scrolled. For example, I have one column for street address, a second for city, a third for state and a forth for zip. When I scroll the address textbox, I want city, state and zip to also scroll. When I select a particular address, the city, state and zip associated with that address in the other columns should also be selected (highlighted).
Any clues as to how to implement that in VBA 6 (and Excel 2000)?
Thank you[/color]
Comments
[code]
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myCol As Integer
Dim myRow As Integer
Dim tmp As String
myCol = ActiveCell.Column
myRow = ActiveCell.row
If myCol = 1 Or myCol = 2 Then
tmp = "A" & myRow & ":" & "E" & myRow
Range(tmp).Select
End If
End Sub
[/code]