Results 1 to 4 of 4

Macro to highlight a certain row

Threaded View

  1. #1
    Registered User
    Join Date
    11-10-2011
    Location
    Jersey, Channel Islands
    MS-Off Ver
    Excel 2007
    Posts
    5

    Question Macro to highlight a certain row

    Before I go any further I must say I am certainly no expert with VB coding or advanced macros, but tend to get the job done by copying bits of code from various web pages.

    I have a combo box linked to a list of 100 or so newspaper titles. As you know when a user selects a choice from a combo box it updates a number in a chosen cell. I need a macro to attach to this combo box so that when a choice is made it jumps to the row on another sheet in the workbook. The row would be the same as the number generated from the choice of the combo box.

    I originally tried this code all the way up to 150, (which took ages to write!) but it doesnt work (??) after number 35 for some reason. Does anyone know an easier way of doing this?

    Select Case UCase(Range("Z1"))
        Case "1": Application.Goto Reference:=Worksheets("Newspapers").Range("A1"), _
        Scroll:=True
        
        Case 2": Application.Goto Reference:=Worksheets("Newspapers").Range("A2"), _
        Scroll:=True
        
        Case "3": Application.Goto Reference:=Worksheets("Newspapers").Range("A3"), _
        Scroll:=True
        
        Case "4": Application.Goto Reference:=Worksheets("Newspapers").Range("A4"), _
        Scroll:=True
    This has already taken up more time than I have. Any help would be most appreciated.

    Thanks
    Last edited by p0c; 11-10-2011 at 08:18 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1