Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide, not close, one workbook
I have three workbooks open. I'd like to set an object to one of them so I
can hide it away from the user, but still have it available for VBA to write to it. As far as I can tell, I have to use Application.Window, but I can't figure out how to set an object to one particular window to manipulate it. Hints and suggestions are greatly appreciated. Ed |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide, not close, one workbook
Wiindows(WorkbookName).Visible = False
WorkbookName should be the name as it appears in the title bar (normally the file name) "Ed" wrote: I have three workbooks open. I'd like to set an object to one of them so I can hide it away from the user, but still have it available for VBA to write to it. As far as I can tell, I have to use Application.Window, but I can't figure out how to set an object to one particular window to manipulate it. Hints and suggestions are greatly appreciated. Ed |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide, not close, one workbook
Hi Ed,
Something like windows("Book2").Visible=False -- HTH Bob Phillips "Ed" wrote in message ... I have three workbooks open. I'd like to set an object to one of them so I can hide it away from the user, but still have it available for VBA to write to it. As far as I can tell, I have to use Application.Window, but I can't figure out how to set an object to one particular window to manipulate it. Hints and suggestions are greatly appreciated. Ed |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide, not close, one workbook
' at the top of a module
Public bk as workbook Sub HideBook() set bk = Workbooks("MyFile.xls") Windows(bk.name).Visible = False End Sub Sub UpdateBk() bk.worksheets("Sheet1").Range("A1").Value = 12 End Sub Sub SeeDatafromBook() msgbox bk.Worksheets("Sheet1").Range("A1").Text End Sub -- Regards, Tom Ogilvy "Ed" wrote in message ... I have three workbooks open. I'd like to set an object to one of them so I can hide it away from the user, but still have it available for VBA to write to it. As far as I can tell, I have to use Application.Window, but I can't figure out how to set an object to one particular window to manipulate it. Hints and suggestions are greatly appreciated. Ed |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Thank you!
Thanks to both of you.
"Ed" wrote in message ... I have three workbooks open. I'd like to set an object to one of them so I can hide it away from the user, but still have it available for VBA to write to it. As far as I can tell, I have to use Application.Window, but I can't figure out how to set an object to one particular window to manipulate it. Hints and suggestions are greatly appreciated. Ed |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide, not close, one workbook
The suggestions from the others will work...for the most part. A more
robust approach is the code fragment below. It is from an add-in I wrote recently for a fried: For i = 2 To MasterWB.Windows.Count MasterWB.Windows(i).Close Next i MasterWB.Windows(1).Visible = False -- Regards, Tushar Mehta www.tushar-mehta.com Multi-disciplinary business expertise + Technology skills = Optimal solution to your business problem Recipient Microsoft MVP award 2000-2005 In article , says... I have three workbooks open. I'd like to set an object to one of them so I can hide it away from the user, but still have it available for VBA to write to it. As far as I can tell, I have to use Application.Window, but I can't figure out how to set an object to one particular window to manipulate it. Hints and suggestions are greatly appreciated. Ed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide Close Button Excel 2007 | Excel Discussion (Misc queries) | |||
Hide worksheets before close | New Users to Excel | |||
close (hide) toolbars | Excel Discussion (Misc queries) | |||
hide detail / close group outline | Excel Programming | |||
Hide minimise, maximise, and close buttons on form | Excel Programming |