Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi,
I have a macro that copies a worksheet from an existing workbook and moves it to a new workbook (book 1, book 2, etc). I then go back to the original workbook to hide the copied sheet. When all this is done I want the user to be looking at the new workbook (book 1, book 2, etc). Please provide some code to add to my copy macro. Thank you very much....you guys/gals are great! |
#2
![]() |
|||
|
|||
![]()
You don't have to return to the original workbook to hide the sheet. If the
macro is in the original workbook then simply: Sheets(1).Copy ThisWorkbook.Sheets(1).Visible = False Hope this helps Rowan "rt10516" wrote: Hi, I have a macro that copies a worksheet from an existing workbook and moves it to a new workbook (book 1, book 2, etc). I then go back to the original workbook to hide the copied sheet. When all this is done I want the user to be looking at the new workbook (book 1, book 2, etc). Please provide some code to add to my copy macro. Thank you very much....you guys/gals are great! |
#3
![]() |
|||
|
|||
![]()
If the code is not in this workbook
Set oThisWB = Activeworkbook oThisWB.Worksheets("Sheet1").Copy oThisWb.Worksheets("Sheet1").Visible = False -- HTH RP (remove nothere from the email address if mailing direct) "rt10516" wrote in message ... Hi, I have a macro that copies a worksheet from an existing workbook and moves it to a new workbook (book 1, book 2, etc). I then go back to the original workbook to hide the copied sheet. When all this is done I want the user to be looking at the new workbook (book 1, book 2, etc). Please provide some code to add to my copy macro. Thank you very much....you guys/gals are great! |
#4
![]() |
|||
|
|||
![]()
Thank you very much. This worked perfectly
"Rowan" wrote: You don't have to return to the original workbook to hide the sheet. If the macro is in the original workbook then simply: Sheets(1).Copy ThisWorkbook.Sheets(1).Visible = False Hope this helps Rowan "rt10516" wrote: Hi, I have a macro that copies a worksheet from an existing workbook and moves it to a new workbook (book 1, book 2, etc). I then go back to the original workbook to hide the copied sheet. When all this is done I want the user to be looking at the new workbook (book 1, book 2, etc). Please provide some code to add to my copy macro. Thank you very much....you guys/gals are great! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HOW DO I SUM TWO CELLS FROM ONE WORKBOOK TO ANOTHER WORKBOOK? | Excel Worksheet Functions | |||
activate workbook w/unknown name | Excel Discussion (Misc queries) | |||
Activate a workbook from a selection | Excel Discussion (Misc queries) | |||
Unprotect Workbook | Excel Discussion (Misc queries) | |||
Stubborn toolbars in Excel | Excel Discussion (Misc queries) |