I'm attempting to write a simple VBA procedure to do pressure unit conversions. Basically, I want to be able to convert from one of several units of measure to another one of several units of measure. The script needs to examine the value entered by the user as well as the "from" unit...and based on that unit selected from a dropdown list, go to a subroutine to compute the "to" value (like "from" n.nnn millibars "to" n.nnn inches of mercury).
I need to know two very basic things:
1. How do I get the values from my cell into the script from the worksheet, and how do I get the computed values out of the script back into the worksheet?
2. How do I use an IF THEN ELSE statement to send the script to the right sub procedure to do the computation? (I'm getting an "undefined label" error message.)
Anyone's help is much appreciated.
I need to know two very basic things:
1. How do I get the values from my cell into the script from the worksheet, and how do I get the computed values out of the script back into the worksheet?
2. How do I use an IF THEN ELSE statement to send the script to the right sub procedure to do the computation? (I'm getting an "undefined label" error message.)
Anyone's help is much appreciated.
Comment