+ Reply to Thread
Results 1 to 3 of 3

Assign a macro to a drop down list

Hybrid View

johnbreg Assign a macro to a drop down... 11-04-2012, 01:32 PM
dogberry Re: Assign a macro to a drop... 11-04-2012, 01:37 PM
johnbreg Re: Assign a macro to a drop... 11-04-2012, 02:21 PM
  1. #1
    Registered User
    Join Date
    11-04-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    2

    Assign a macro to a drop down list

    I need to attach a macro to a drop-down list in a cell on a worksheet to direct the user to the next stage (Cell) of the process when filling in a form. All action takes place on the same worksheet. I am using Excel 2010. After the user has selected from the list, I want automatically move to the next required cell, which will then be highlighted by the border being coloured.

    The code I am using is:

    If Range("F10") <> "" Then
    MsgBox "Now set the Calendar for your Workbook"
    Range("B13").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
    .LineStyle = xlContinuous
    .Color = -317143
    .TintAndShade = 0
    .Weight = xlThick
    End With
    With Selection.Borders(xlEdgeTop)
    .LineStyle = xlContinuous
    .Color = -317143
    .TintAndShade = 0
    .Weight = xlThick
    End With
    With Selection.Borders(xlEdgeBottom)
    .LineStyle = xlContinuous
    .Color = -317143
    .TintAndShade = 0
    .Weight = xlThick
    End With
    With Selection.Borders(xlEdgeRight)
    .LineStyle = xlContinuous
    .Color = -317143
    .TintAndShade = 0
    .Weight = xlThick
    End With
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
    End If
    Any ideas?
    Last edited by johnbreg; 11-04-2012 at 02:18 PM. Reason: Improve understanding

  2. #2
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Assign a macro to a drop down list

    http://www.excelforum.com/excel-prog...-list-box.html

    Hi

    Have a look at the above post that may answer your question for you

    Chris
    Click my star if I helped Thanks

  3. #3
    Registered User
    Join Date
    11-04-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Assign a macro to a drop down list

    Thanks. I'll give it a try and get back later

+ Reply to Thread

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