Hello,
Does anyone know if it's possible to use a dynamic message for an InputBox that is called on versus hard coded into the Procedure?
I understand how to customize an InputBox; one of my examples here:
However, I'm wondering if it's possible to make that InputBox message dynamic based on another procedure.
For example:
I have a Function thanks to forum member Micron (here) that I'm using to prompt for a number of rows to insert into a Table (portion seen above).
I want to use the Function with another Procedure that enters a Due Date which enteres Today's date and then adds 21 days. I plan to create another one that prompts for the number of days to add. This is where the Dynamic Message comes into play.
In one scenario, the message is for the number of Table Rows to enter, while the 2nd one is asking for the number of Days to add.
Maybe something like:
Instead of baking the custom Message into each Procedure, perhaps there's a way to create the various Messages and then Call on them within the given Procedure itself (for Days or Rows) to be passed to my getNum Function...?
Based on my various search results, I haven't come across anyone doing anything like this. However, I figured I would still raise the question here.
Thanks,
Does anyone know if it's possible to use a dynamic message for an InputBox that is called on versus hard coded into the Procedure?
I understand how to customize an InputBox; one of my examples here:
VBA Code:
getNum = InputBox("Enter number of rows to insert", _
"Insert Rows at end of Table", 1)
However, I'm wondering if it's possible to make that InputBox message dynamic based on another procedure.
For example:
I have a Function thanks to forum member Micron (here) that I'm using to prompt for a number of rows to insert into a Table (portion seen above).
I want to use the Function with another Procedure that enters a Due Date which enteres Today's date and then adds 21 days. I plan to create another one that prompts for the number of days to add. This is where the Dynamic Message comes into play.
In one scenario, the message is for the number of Table Rows to enter, while the 2nd one is asking for the number of Days to add.
Maybe something like:
VBA Code:
getNum = InputBox(DynamicPrompt, DynamicTitle, 1)
Instead of baking the custom Message into each Procedure, perhaps there's a way to create the various Messages and then Call on them within the given Procedure itself (for Days or Rows) to be passed to my getNum Function...?
Based on my various search results, I haven't come across anyone doing anything like this. However, I figured I would still raise the question here.
Thanks,