Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Cory Nelson   on Feb 24 In MS Office Category.

  
Question Answered By: Hooriya Khan   on Feb 24

Yes you can nest functions in VBA.
The following example  controls the formatting of dates.
As you can see the Now function  (which returns the system date and
time) is used as the first argument  to the Format function, whose
second argument is the format picture.


Sub FunctionWithinFunction()
' Use Ctrl + G to display the Immediate window before
' running this procedure.

Debug.Print Format(Now, "dd-mmmm-YYYY")

End Sub

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on function as argument Or get search suggestion and latest updates.


Tagged: