rationalist
rationalist

Reputation: 65

What does := mean in VBA

This might be a simple question but I'm searching online for the answer and can't seem to find it.

With the use of the code below as an example, what do these symbols mean. Symbol 1 :="" Symbol 2 :=_

Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _

Upvotes: 4

Views: 5136

Answers (1)

D.K.
D.K.

Reputation: 478

This is so called "Named argument". Meaning you can pass arguments to PrintOut in any order you like, as long as you name them on the left side of ":=" operator.

Alternatively you would need to provide all the arguments in the exact order specified here https://msdn.microsoft.com/en-us/library/office/ff840681.aspx

More on named arguments in VBA here: https://msdn.microsoft.com/en-us/library/office/gg251503.aspx

Upvotes: 5

Related Questions