KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to call a function with a variable name that is generated at run time based upon a combo box value. This is straightforward in most languages but I can't seem to figure it out in Excel VBA, I suspect this is because I don't really understand how the compiler works. I've found several posts that are close but don't quite seem to do the trick. The code below is wrong but should give an idea of what I want. Thanks Sub main() 'run formatting macros for each institution on format button click Dim fn As String Dim x As Boolean 'create format function name from CB value fn = "format_" & CBinst.Value 'run function that returns bool x = Eval(fn) ... End Sub
Tags (comma-separated)
Save Edits
Cancel