lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
No one talk about "Workbooks.close" --> collection leve<collection level="">. I did google search and they are all talking about "Workbooks("name").close" <-- workbook level<workbook level="">
The code below, will close the first workbook no matter how many workbooks are open. My questions
1) How can I improve that code and control what I want to close for example ask user which workbooks he/she wants to close
2) can that code imporve without using inputbox function to control what to close? Thank you so much
</workbook></collection>
No one talk about "Workbooks.close" --> collection leve<collection level="">. I did google search and they are all talking about "Workbooks("name").close" <-- workbook level<workbook level="">
The code below, will close the first workbook no matter how many workbooks are open. My questions
1) How can I improve that code and control what I want to close for example ask user which workbooks he/she wants to close
Code:
x=inputbox("enter workbook number (index) you want to close")
Code:
Sub april15_2()
Workbooks.Close
End Sub
Last edited: