Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
"aposatsk" wrote:
Upon opening my main excel file, I would like another file in the same folder to be opened. Is this possible? You can try this by saving the files in a workspace, but then your viewing settings (show gridlines, row/col headers, etc.) are all replaced by defaults. The way that worked best for me was to enter code similar to the following in the "ThisWorkbook" module of my primary workbook in Visual Basic: Private Sub Workbook_Open() Dim MyPath As String MyPath = ThisWorkbook.Path Workbooks.Open (MyPath & "\workbook4.xls") 'Alternatively, you could specify the full path Workbooks.Open (MyPath & "\workbook3.xls") Workbooks.Open (MyPath & "\workbook2.xls") Workbooks(1).Activate 'Places primary workbook on top Application.ShowWindowsInTaskbar = False 'These two lines might not be needed on Application.ShowWindowsInTaskbar = True 'your system End Sub Now, whenever my primary workbook is opened, the other workbooks open automatically, looking just as they were when I last saved them. This example requires all the workbooks involved to be in the same directory as the primary one, but you could always specify full paths. On my system, something weird happens with the taskbar if I omit the last two lines of the procedure; you may or may not need them on your system. Good luck! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to Open Excel File Please Help | Excel Discussion (Misc queries) | |||
Excel Outlook Attachments opening after several errors everytime | Setting up and Configuration of Excel | |||
Links picking up values from an older version of linked file | Links and Linking in Excel | |||
Can Only open files using file ~ open | Excel Discussion (Misc queries) | |||
hidden rows & columns slow file open | Excel Discussion (Misc queries) |