Results 1 to 14 of 14

VBA - Help creating a Macro for a button

Threaded View

  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    San Francisco
    MS-Off Ver
    Excel 2010
    Posts
    18

    VBA - Help creating a Macro for a button

    *File attached for reference

    I am trying to write a large macro associated with the button on 'Sheet2'. First i need to identify the country that i select in the drop down as my 'index'. i am having trouble getting that to happen.

    Then, after i define the country, i will then need to have the fields populated below with the information in the Data Field. The catch is that the amount of fields needed may vary from all 5, to only 1. I can use a "hide" function if needed, but was wondering if there was a better way.

    Data for Drop down:

    Sub Dorp_Down1()
    
        'pull index
        Dim index As Integer
        Dim linkAddress As String
        Dim linkName As String
        
        index = ActiveSheet.Shapes(Application.Caller).ControlFormat.ListIndex + 1
        
        
        'Country Header
        Sheets("Sheet1").Cells(3, 1) = Sheets("Market Hyperlink").Cells(index, 1).Value
        
    End Sub
    Attached Files Attached Files
    Last edited by arlu1201; 07-27-2012 at 07:42 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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