LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Repost with code - Runtime error '1004'

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
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
runtime error code 1004 Karen Excel Worksheet Functions 1 May 13th 10 12:21 AM
runtime error '1004' Steve Excel Discussion (Misc queries) 1 April 28th 06 08:58 PM
Runtime Error '1004' [email protected] Excel Discussion (Misc queries) 2 July 18th 05 06:10 AM
runtime error 1004 monika Excel Programming 3 February 11th 04 09:48 AM
Runtime error 1004 Gary[_4_] Excel Programming 1 October 10th 03 02:21 PM


All times are GMT +1. The time now is 10:10 PM.

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"