Need help keeping cells/column in lockstep

[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]


  • think you would be better to store the info in an access database, but here's one way to highlight a row of cells if column 1 or 2 is selected [see download file]

    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
    End If
    End Sub
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion