I'm incredibly close to getting a couple of different things to work together well, but I'm doing something wrong that is probably pretty simple.
I have a macrobook that has two buttons which call macros. The first to select a workbook, and the second to select a macro. The workbook shows to the user in the following way:
DW1.png
The workbook they select ends up as a text string in B6, while the macro they wish to run on that book ends up in B9.
I am now trying to put a third macro together that runs the selected macro on the selected workbook, using the following code:
Outside of the function I have:
Public StepOne As Workbook
Public StepTwo As String
and the third button links to this:
Sub GO()
StepOne = Sheets(1).Range("B6").Value
StepTwo = Sheets(1).Range("B9").Value
StepOne.Activate
Call StepTwo
End Sub
This doesn't work at all. I understand HOW it's supposed to work, but I don't know how to code it correctly. My ultimate goal is to have this sub activate the selected Workbook, then execute the selected macro.
Ideas?
Bookmarks