I'm using a simple inputbox function to query a number of variables from the workbook user, to be used in a new object created from a class module.
I'd like to name the new object a unique concatenation of the variables being stored within it to archive in a library for tracking.
Currently, my functions (seven in all) are written as such:
I run into trouble because everytime I need to reference the returned variable in my primary macro I call a new InputBox (the function). I will also need to error check these user inputs in the function to ensure they're the appropriate datatype, thus it makes sense to return a different variable name from the function.![]()
Please Login or Register to view this content.
How can I write my functions to call the inputbox function (function within a function) in such a way that a different variable name is returned? Please bear in mind the function should allow for IF statements to qualify the user input before being returned to the sub.
I've included the workbook for reference. The primary macro is named "AddNMP", and the sub "InputBoxNewMarginPlacement" will ultimately be inserted / called into / by "AddNMP." The code is a bit messier than usual because I've been trying to test the concatenation, but those lines have been remarked - feel free to ignore.
Bookmarks