LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default vba code to open workbooks

This works great! Just what I was looking for. After installing, I see
that I would like to take this a step further. Can you help me with a code
that will automatically minimize Table and also automatically close Table
when 248.xls is closed?

"FSt1" wrote:

hi
in the this workbook module of 248.xls, put this code. change the file path
to your file path.
Private Sub Workbook_Open()
Workbooks.Open Filename:= _
"C:\your\file\path\table.xls"
End Sub
to install..
open the vb editor.....Alt+F11
in the project window(far left), expand project 248.xls. click on this
workbook.
in the code window(far right), click on the left drop down and select
workbook.
Private Sub Workbook_Open() should default.
past the above code....
Workbooks.Open Filename:= _
"C:\your\file\path\table.xls"
close the vb editor and save the file.
each time 248.xls is opened, table.xls will open.

regards
FSt1
"Rebecca1" wrote:

Does anyone have a code that will open a workbook w/name Table.xls that is in
the same directory as the workbook w/name 248.xls that is open. I would
like for the Table workbook to open when a user opens 248 workbook.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need VB code for workbook open to open a link Daniel Baker Excel Discussion (Misc queries) 2 August 18th 06 01:30 AM
macro or code to open multiple workbooks Duane Reynolds Excel Discussion (Misc queries) 1 March 14th 06 08:18 AM
When I open Excel, workbooks open automatically. How can I stop t Rhealbird Excel Discussion (Misc queries) 2 February 23rd 06 10:08 AM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Visual Basic code available for all open workbooks KristiB Excel Worksheet Functions 5 May 6th 05 08:46 PM


All times are GMT +1. The time now is 06:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"