简体   繁体   中英

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:= _

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM