My Assistant
![]() ![]() |
|
|
Apr 17 2012, 02:42 PM
Post
#1
|
|
|
UtterAccess Ruler Posts: 1,357 |
UseAsRef As Boolean
i see the true false values in debug mode, but where does this value come from in a function such as: Function SheetName(rCell As Range, Optional UseAsRef As Boolean) As String Application.Volatile If UseAsRef = True Then SheetName = "'" & rCell.Parent.Name & "'!" Else SheetName = rCell.Parent.Name End If End Function ??? thank you. |
|
|
|
Apr 17 2012, 03:04 PM
Post
#2
|
|
|
UtterAccess Certified! Posts: 6,943 From: Arizona, United States |
Hello,
I am interested in trying to answer this or contribute, but I'm unclear on your question. It appears that someone wrote a function that was intended to do this in plain english: 1. provide a function with required argument rCell (to be used as Range), and optional argument UseAsRef (to be used as Boolean). 2. The function will evaluate to string expression of worksheet name if UseAsRef is False, otherwise, with an additional single quote at the beginning and exclamation point at the end. I'm not clear on your question? |
|
|
|
Apr 17 2012, 03:14 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 4,297 |
Not sure what you mean.
You pass the values to the function, if you don't pass the (optional) boolean value it will be the default value for Boolean which is False. If you don't want it to be False you can specify the default value like this. CODE Function SheetName(rCell As Range, Optional UseAsRef As Boolen = True) As String
|
|
|
|
Apr 17 2012, 05:53 PM
Post
#4
|
|
|
UtterAccess Ruler Posts: 1,357 |
thank you...
i missed the arguments in the function...thank you...! |
|
|
|
Apr 17 2012, 06:25 PM
Post
#5
|
|
|
UtterAccess VIP Posts: 4,297 |
And I missed the a in Boolean.(IMG:style_emoticons/default/dazed.gif)
Why don't forums have IntelliSense?(IMG:style_emoticons/default/smile.gif) |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 26th May 2013 - 12:33 AM |