lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I understand that workbooks.open returns a workbook object. So it returns something and because of that, I thought it should be call using ( ) for example workbooks.open("abc.xlsx"), but the author of this link https://analysistabs.com/excel-vba/open-close-existing-workbook/
called workbooks.open function without using ( )
Any idea why? and why it works? Thank you
I understand that workbooks.open returns a workbook object. So it returns something and because of that, I thought it should be call using ( ) for example workbooks.open("abc.xlsx"), but the author of this link https://analysistabs.com/excel-vba/open-close-existing-workbook/
called workbooks.open function without using ( )
Any idea why? and why it works? Thank you
Code:
Sub Open_ExistingWorkbook()
Workbooks.Open "C:\WorkbookName.xls"
'OR
'Workbooks.Open Filename:="C:\WorkbookName1.xls"
End Sub
Last edited: