Is it possible to pass parameter(s) to an excel workbook? Then what is called a workbookparameter?

prabha_friend

Board Regular
Joined
Jun 28, 2011
Messages
95
What is called an excel workbookparameter? If we can change a name into a workbookparamter, can we pass variables to an workbook?

One more question:
I have given a name for a constant.
Constant's Value = 10
Name of the constant = Constant1

But Activeworkbook.names("Constant1").value is giving "=10". What is the effective way to read the constant's value without the "=" on it?

Note:
I am naming a constant because I don't want to allot a cell to hold a value which doesn't actually require a cell to reside.
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi

If you want the value of the named constant you have to evaluate it

Try:

Code:
MsgBox Evaluate("Constant1")
 
Upvote 0
Thank you very much pgc. I searched on net about the workbookparameter but not getting a clear idea. Is it possible to parameterize an excel workbook?
 
Upvote 0
Hi

If you want the value of the named constant you have to evaluate it

Try:

Code:
MsgBox Evaluate("Constant1")

OK. I got how to read the value of a named constant in the right way but how to set it in the right way? Do I have to append an "=" always before that?
while setting workbook.names("Constant1").value = "=" & evaluate("Constant1")+1

?

Thanks to your reply.
 
Upvote 0
Hi

I don't think you have to append the "=". Excel will do it automatically.
Did you test it?
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,269
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top