lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
How come excel would accept the first code but not the second one. I thought save is a function and if you call a function then you should use this syntax
ObjectName.FunctionName() <<if the function takes no argument >>
Sub myfirst()
Workbooks(1).Save
End Sub
++++++++++++++++++++
Sub myfirst()
Workbooks(1).Save ()
End Sub
How come excel would accept the first code but not the second one. I thought save is a function and if you call a function then you should use this syntax
ObjectName.FunctionName() <<if the function takes no argument >>
Sub myfirst()
Workbooks(1).Save
End Sub
++++++++++++++++++++
Sub myfirst()
Workbooks(1).Save ()
End Sub