Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
i had to change the flie extension from .xls to .xlsx to work with office 2007
"Gord Dibben" wrote: 1004 generally means there is no such path or filename. Gord Dibben MS Excel MVP On Sat, 5 Dec 2009 12:38:01 -0800, uk wrote: 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 . |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You should be able to open *.xls files in 2007 version.
Gord On Sun, 6 Dec 2009 08:35:01 -0800, uk wrote: i had to change the flie extension from .xls to .xlsx to work with office 2007 "Gord Dibben" wrote: 1004 generally means there is no such path or filename. Gord Dibben MS Excel MVP On Sat, 5 Dec 2009 12:38:01 -0800, uk wrote: 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
i want to open a second workbook automatically when i open the fir | Excel Discussion (Misc queries) | |||
is it possible to open a second workbook automatically | Excel Discussion (Misc queries) | |||
A way to Open 2nd Workbook automatically | Excel Discussion (Misc queries) | |||
Run a macro automatically on workbook open | Excel Worksheet Functions | |||
open workbook automatically | Excel Discussion (Misc queries) |