Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default how do i open a second workbook automatically

i have tried all of the following

Double click 'This WorkBook' and paste the below code to the right code pane.
Private Sub Workbook_Open()
Workbooks.Open Me.Path & "\data.xls"
End Sub

Private Sub Workbook_Open()
Workbooks.Open ("C:\data.xls")
End Sub

Private Sub Workbook_Open()
Workbooks.Open Filename:="D:\lorne stewart\timesheet\2008\data.xls"
End Sub


i have several answers but none work
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default how do i open a second workbook automatically

What do you mean when you say it doesn't work? Do you get an error message or
does nothing seem to happen at all? If you get an error message that the file
cannot be found, the path and/or filename in the macro are not correct. If
nothing seems to happen, you probably have macros disabled or the code is not
in the ThisWorkbook module (when you are in the ThisWorkbook module, the
title at the top of the screen should say [ThisWorkbook (Code)].) There is
nothing wrong with the code itself.

Hope this helps,

Hutch

uk" wrote:

i have tried all of the following

Double click 'This WorkBook' and paste the below code to the right code pane.
Private Sub Workbook_Open()
Workbooks.Open Me.Path & "\data.xls"
End Sub

Private Sub Workbook_Open()
Workbooks.Open ("C:\data.xls")
End Sub

Private Sub Workbook_Open()
Workbooks.Open Filename:="D:\lorne stewart\timesheet\2008\data.xls"
End Sub


i have several answers but none work

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default how do i open a second workbook automatically

run time error'1004'
"Tom Hutchins" wrote:

What do you mean when you say it doesn't work? Do you get an error message or
does nothing seem to happen at all? If you get an error message that the file
cannot be found, the path and/or filename in the macro are not correct. If
nothing seems to happen, you probably have macros disabled or the code is not
in the ThisWorkbook module (when you are in the ThisWorkbook module, the
title at the top of the screen should say [ThisWorkbook (Code)].) There is
nothing wrong with the code itself.

Hope this helps,

Hutch

uk" wrote:

i have tried all of the following

Double click 'This WorkBook' and paste the below code to the right code pane.
Private Sub Workbook_Open()
Workbooks.Open Me.Path & "\data.xls"
End Sub

Private Sub Workbook_Open()
Workbooks.Open ("C:\data.xls")
End Sub

Private Sub Workbook_Open()
Workbooks.Open Filename:="D:\lorne stewart\timesheet\2008\data.xls"
End Sub


i have several answers but none work

Reply
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
i want to open a second workbook automatically when i open the fir [email protected] uk Excel Discussion (Misc queries) 12 December 1st 09 09:21 AM
is it possible to open a second workbook automatically [email protected] uk Excel Discussion (Misc queries) 1 November 24th 09 06:31 PM
A way to Open 2nd Workbook automatically JackR Excel Discussion (Misc queries) 6 March 20th 06 08:15 PM
Run a macro automatically on workbook open tweacle Excel Worksheet Functions 2 February 25th 06 06:38 PM
open workbook automatically Jo Coen Excel Discussion (Misc queries) 2 July 29th 05 11:57 AM


All times are GMT +1. The time now is 04:24 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"