lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I want to learn when I use := or () or "argument" when I use a function. I tried to write workbooks(1). protect in 3 ways and they all works! which got me more confused. Why the 3 of them accepted.
Workbooks(1).Protect "123"
Workbooks(1).Protect ("123")
Workbooks(1).Protect password :="123"
I just read that a function need () if it returns a value, but this function returns nothing then why Workbooks(1).Protect ("123") accepted? Thank you.
I want to learn when I use := or () or "argument" when I use a function. I tried to write workbooks(1). protect in 3 ways and they all works! which got me more confused. Why the 3 of them accepted.
Workbooks(1).Protect "123"
Workbooks(1).Protect ("123")
Workbooks(1).Protect password :="123"
I just read that a function need () if it returns a value, but this function returns nothing then why Workbooks(1).Protect ("123") accepted? Thank you.