This should be simple, a "level 1 user question." I wanted to seed an input box with 200% like
sVal = InputBox(...,200%)
so that the input line says
200%
but the only way I came up with to get the % to display was to use a string, like
sVal = InputBox(...,"200%")
Note, InputBox returns a string (sVal) regardless. As that string goes, I don't care if the % is there or not in sVal; I can react appropriately. (And by the way, I don't think Format() improves anything here.)
But if sVal is "200%" then dVal=cDbl(sVal) fails. Is there another way to
1. Show the percent sign in the white area of the InputBox
2. Get the value 2 or 200 to the Double variable dVal
...short of having to parse out the % sign from sVal? Maybe using InputBox(...,"200%") is not the best approach.
( And by the way, speaking of parsing, is there a VBA counterpart of Substitute? Say, for Application.Worksheetfunction.substitute(sVal,"%","") ?)
Bookmarks