Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
dear all,
it is for presentation. may i know any other way to make my workbook visible without specify the workbook name? because i have 10 workbooks need to do like this. i open each workbook 1 at a time so no clash between. i am thinking of using same shortcut key to make it visible without specify the workbook name first i make it invisible. here of course i need to specify the workbook name. MyPath2 = "\\server\temp\ctc.xls#'Debtors & Milestone highlights'!a1" Set xlx = Workbooks.Open("\\servertemp\ctc.xls", UpdateLinks:=0) ActiveWorkbook.FollowHyperlink (MyPath2) ActiveWindow.ScrollColumn = 1 ActiveWindow.ScrollRow = 1 ActiveWindow.Visible = False later when need it will use shortcut key to show. here can i make it visible without specify the name so that i need not to create 10 different sub doing the same task. i want to use the same sub for 10 workbook so is there a way no need to define the workbook here. any coding to make invisible window or workbook to become visible without need to specify the name? Sub make_visible() Range("A1").Select Windows("ctc.xls").Visible = True End Sub |
#2
![]() |
|||
|
|||
![]()
If your xlx variable still holds the reference to the workbook, maybe something
like: Dim xlx As Workbook Dim myWindow As Window 'I used the activeworkbook for testing. 'Set xlx = ActiveWorkbook For Each myWindow In xlx.Windows myWindow.Visible = False Next myWindow If you put: Dim xlx as workbook at the top of your module (out of the scope of any procedure), then unless you reset your project (or clear that variable some other way), then xlx should still point to your workbook. mango wrote: dear all, it is for presentation. may i know any other way to make my workbook visible without specify the workbook name? because i have 10 workbooks need to do like this. i open each workbook 1 at a time so no clash between. i am thinking of using same shortcut key to make it visible without specify the workbook name first i make it invisible. here of course i need to specify the workbook name. MyPath2 = "\\server\temp\ctc.xls#'Debtors & Milestone highlights'!a1" Set xlx = Workbooks.Open("\\servertemp\ctc.xls", UpdateLinks:=0) ActiveWorkbook.FollowHyperlink (MyPath2) ActiveWindow.ScrollColumn = 1 ActiveWindow.ScrollRow = 1 ActiveWindow.Visible = False later when need it will use shortcut key to show. here can i make it visible without specify the name so that i need not to create 10 different sub doing the same task. i want to use the same sub for 10 workbook so is there a way no need to define the workbook here. any coding to make invisible window or workbook to become visible without need to specify the name? Sub make_visible() Range("A1").Select Windows("ctc.xls").Visible = True End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can Excel open each workbook in a seperate window | Setting up and Configuration of Excel | |||
Resize the workbook window is impossible | Excel Discussion (Misc queries) | |||
unhide hidden window or workbook | Excel Worksheet Functions | |||
Stubborn toolbars in Excel | Excel Discussion (Misc queries) | |||
better search: "make worksheet visible" | Excel Discussion (Misc queries) |