lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I want to ask user to enter workbook number to close and then close that workbook accordingly. So I wrote the code below, but did not run. Any help would be appreciated. Thank you.
I want to ask user to enter workbook number to close and then close that workbook accordingly. So I wrote the code below, but did not run. Any help would be appreciated. Thank you.
Code:
Sub mywb2()
Dim x As Integer
x = InputBox("which workbook")
"workbooks" &x.close
End Sub