Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba code
hi everybody,
i have sheet1, sheet2 & sheet3 in a workbook. what i want is, if i save the file i want to hide sheet2 & sheet3, so only sheet1 is visible. after the saving i want to show again the hide sheets. pls. help. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba code
Hi,
So sheet2 & sheet3 become hidden when you save but as soon as the save is complete they become visible again. I must have misunderstood, please clarify. Mike "EricBB" wrote: hi everybody, i have sheet1, sheet2 & sheet3 in a workbook. what i want is, if i save the file i want to hide sheet2 & sheet3, so only sheet1 is visible. after the saving i want to show again the hide sheets. pls. help. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba code
Hi,
Maybe the question was how to hide unhide sheets ? seb. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba code
Hi Mike,
Thanks for the response. Exactly, as what you have written. Pls. help me with this. "Mike H" wrote: Hi, So sheet2 & sheet3 become hidden when you save but as soon as the save is complete they become visible again. I must have misunderstood, please clarify. Mike "EricBB" wrote: hi everybody, i have sheet1, sheet2 & sheet3 in a workbook. what i want is, if i save the file i want to hide sheet2 & sheet3, so only sheet1 is visible. after the saving i want to show again the hide sheets. pls. help. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba code
I'm still not sure I understand you, probably because I can't imagine why
you'd want to do it. So, at the risk of being completely off-target, try the following: Sheets("Sheet2").Select ActiveWindow.SelectedSheets.Visible = False Sheets("Sheet3").Select ActiveWindow.SelectedSheets.Visible = False ActiveWorkbook.Save Sheets("Sheet2").Visible = True Sheets("Sheet3").Visible = True End Sub "EricBB" wrote: Hi Mike, Thanks for the response. Exactly, as what you have written. Pls. help me with this. "Mike H" wrote: Hi, So sheet2 & sheet3 become hidden when you save but as soon as the save is complete they become visible again. I must have misunderstood, please clarify. Mike "EricBB" wrote: hi everybody, i have sheet1, sheet2 & sheet3 in a workbook. what i want is, if i save the file i want to hide sheet2 & sheet3, so only sheet1 is visible. after the saving i want to show again the hide sheets. pls. help. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
vba code
You don't need to Select each sheet before making it invisible...
Sheets("Sheet2").Visible = False Sheets("Sheet3").Visible = False ActiveWorkbook.Save Sheets("Sheet2").Visible = True Sheets("Sheet3").Visible = True Rick "Daryl Fagala" wrote in message ... I'm still not sure I understand you, probably because I can't imagine why you'd want to do it. So, at the risk of being completely off-target, try the following: Sheets("Sheet2").Select ActiveWindow.SelectedSheets.Visible = False Sheets("Sheet3").Select ActiveWindow.SelectedSheets.Visible = False ActiveWorkbook.Save Sheets("Sheet2").Visible = True Sheets("Sheet3").Visible = True End Sub "EricBB" wrote: Hi Mike, Thanks for the response. Exactly, as what you have written. Pls. help me with this. "Mike H" wrote: Hi, So sheet2 & sheet3 become hidden when you save but as soon as the save is complete they become visible again. I must have misunderstood, please clarify. Mike "EricBB" wrote: hi everybody, i have sheet1, sheet2 & sheet3 in a workbook. what i want is, if i save the file i want to hide sheet2 & sheet3, so only sheet1 is visible. after the saving i want to show again the hide sheets. pls. help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Code to find code | Excel Discussion (Misc queries) | |||
Convert a Number Code to a Text Code | Excel Discussion (Misc queries) | |||
Unprotect Code Module in Code | Excel Discussion (Misc queries) | |||
copying vba code to a standard code module | Excel Discussion (Misc queries) |