|
-
Aug 24th, 2001, 01:32 AM
#11
Registered User
I think an explanation is required
Originally posted by T-Bone
According to your line of Code you set the Value of the Function as such:
StartDate = Date1
Are you trying to pass-back the value they already sent you?
No. I don't think you understand what is going on there. That function actually modifies the value of date1 as it goes so when it gets to the last line of the function, StartDate = Date1 , Date1 no longer holds the same value that was passed to the function. The problem with this approach is that when passing by ref, the function would change the value of the variable passed into it. By passing it by value the function does not alter the value of the date passed into it which is preferable.
To really understand, I suggest you change the declaration and see what happens to the value of the date you pass into the function 
dw85745, if you want to see the number, try:
?CDbl(#1/1/2001#)
?CDbl(#1/1/2001 1:45:00 PM#)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|