Hello everyone! After how much help these boards have given me in the past, I thought it was time to finally register and say hello!
I'm not sure if I'm going about my macro in the correct fashion but, here is a description of what it's doing.
Sheet 1: I have a cover page with instructions on how to enable the macros to run as error-free as possible (trust documents / network drives) etc. As well as a drop down to select a product to run a macro to try and automate the copy & paste of populating the data in Sheet 2.
Sheet 2: Has a lot of numerical data in it, that each have titles given by Sheet 3, Column A.
Sheet 3: I call this the "Master List", Column A has the titles in it that are branched to sheet 2, and in column B it has the names of the Macros (Similar to Column A, but without spaces and shortened.
I have tried "cell-link" from the drop down to make my life easier but, that didn't get me anywhere.
Main goal: If Selection = string in column A, then run the macro name in the next column over.
Any help would be appreciated!!
I'm not sure if I'm going about my macro in the correct fashion but, here is a description of what it's doing.
Sheet 1: I have a cover page with instructions on how to enable the macros to run as error-free as possible (trust documents / network drives) etc. As well as a drop down to select a product to run a macro to try and automate the copy & paste of populating the data in Sheet 2.
Sheet 2: Has a lot of numerical data in it, that each have titles given by Sheet 3, Column A.
Sheet 3: I call this the "Master List", Column A has the titles in it that are branched to sheet 2, and in column B it has the names of the Macros (Similar to Column A, but without spaces and shortened.
I have tried "cell-link" from the drop down to make my life easier but, that didn't get me anywhere.
Code:
Private Sub ComboBox1_Change()
Dim Temp As String
Dim MacroName As String
'Dim test As Range
Dim i As Integer
'Set Default Counter
i = 2
'ComboBox selection
Result = ComboBox1.Value
'CellLink (What is currently selected on drop down)
Temp = CStr(Worksheets("List").Cells(2, 4).Value)
'Loop through Macro names, need to find a way to reference to Result/Temp to run macro
MacroName = CStr(Worksheets("List").Cells(i, 2).Value)
Do While MacroName <> ""
i = i + 1
MacroName = Worksheets("List").Cells(i, 2)
Loop
'Tried making this work with Cell-Link
If Result = Temp Then
Application.Run "MacroName"
End If
End Sub
Any help would be appreciated!!
Last edited: