Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, (see code below)
Some users are getting the following error. "Run-time error '1004' Method 'open' of object 'workbooks' failed." Obviously I'm not sure why. The user has to click on a link that open the excel sheet. Then they click on a button on the sheet that open another sheet read only and updates the original sheet. When the butto is clicked the error is showing up. The files are in the same director so if the user is able to open the file via the link the user shoul also be able to open the other file. This is happening in excel 2000 but the file works fine on my box i excel 2000. Any ideas? Thanks, Jeff Private Sub UserForm_Initialize() Dim wb As Workbook Application.ScreenUpdating = False ' turn off the screen updating Set wb = Workbooks.Open("\\sfna-fs4\hrs\shared\CT Training\ctmTrainingData.xls", True, True) ' open the source workbook, read only With ThisWorkbook.Worksheets("Training") ' read data from the source workbook .Range("A1:B13").Formula wb.Worksheets("Sheet3").Range("A1:B13").Formula End With With ThisWorkbook.Worksheets("SignUp") ' read data from the source workbook .Range("A:B").Formula wb.Worksheets("SignUp").Range("A:B").Formula End With wb.Close False ' close the source workbook without saving an changes Set wb = Nothing ' free memory Application.ScreenUpdating = True ' turn on the screen updating cmbName.Value = "" End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
runtime error code 1004 | Excel Worksheet Functions | |||
runtime error '1004' | Excel Discussion (Misc queries) | |||
Runtime Error '1004' | Excel Discussion (Misc queries) | |||
runtime error 1004 | Excel Programming | |||
Runtime error 1004 | Excel Programming |