![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Arkansas
Posts: 358
|
Hi all, Beginer here. Is there a way to Close a Workbook ?, I am trying to have a Cmd button that Closes a workbook, and after, return to another.
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
Return to another specific workbook?
__________________
~Anne Troy |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Arkansas
Posts: 358
|
Yes, I have a cmd button, that opens a workbook, the workbook is protected (windows). The Prob is , when I connect, since it is protected windows, there is no close button. And If I close, It closes All Workbooks
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
So, if I'm right, you want a command button in Workbook 2 that will open and close Workbook 1??
Not very difficult, if that's what you want.
__________________
~Anne Troy |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: Arkansas
Posts: 358
|
Yes Dream, Just a simple close the workbook, and return to previous book
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
Give me a few...
__________________
~Anne Troy |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
You've tried this?
Windows("WorkbookName.xls").Activate ActiveWorkbook.Close
__________________
~Anne Troy |
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Location: Arkansas
Posts: 358
|
Like I said, a beginer Dream. Im sure that is the correct code, I just couldnt figure it out.. Thx you so much Dan
|
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
Cool! Cause I sure don't consider myself a coder. I recorded that one, Dan.
__________________
~Anne Troy |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|