PC Review


Reply
Thread Tools Rate Thread

downloading excel file for open causes "file is locked for editing

 
 
HigherImpact
Guest
Posts: n/a
 
      3rd Dec 2007
I have excel files that have visual basic code.

When these excel files are downloaded from the web and opened (they are
downloaded into a temporary folder and have a name like test[2].xls), we get
an error "file is locked for editing". When the file is downloaded and
saved, then opened, everything works fine.

Auto open works fine, but the error occurs when trying to call
RFRsummary_menu_add.

I have also tried calling RFRsummary_menu_add directly from auto open, but
that fails too.

Sub Auto_Open()
Application.Worksheets("RFR Summary").OnSheetActivate =
ActiveWorkbook.Name & "!Module1.RFRsummary_menu_add"
Application.Worksheets("RFR Summary").OnSheetDeactivate =
ActiveWorkbook.Name & "!Module1.RFRsummary_menu_del"
Application.Worksheets("RFR Details").OnSheetActivate =
ActiveWorkbook.Name & "!Module1.RFRdetails_menu_add"
Application.Worksheets("RFR Details").OnSheetDeactivate =
ActiveWorkbook.Name & "!Module1.RFRdetails_menu_del"
End Sub

Sub RFRsummary_menu_add()
MenuBars(xlWorksheet).Menus.Add Caption:="RFR Print"

MenuBars(xlWorksheet).Menus("RFR Print").MenuItems.Add _
Caption:="Print RFR Summary", _
OnAction:="Print_Summary"
End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I delete a 'locked-for-editing" file? Jack Van Hooser Microsoft Excel Crashes 1 1st Jun 2009 04:16 PM
Excel "file locked for editing" Farqy Microsoft Excel Crashes 1 20th Feb 2008 10:51 AM
Trying to Open Excel File, But its says file is locked for editing =?Utf-8?B?U21lZXRhIEdlYXJ5?= Microsoft Excel Misc 1 20th Sep 2005 01:28 PM
cant open a file getting a locked for editing error =?Utf-8?B?SHVycmljYW5lUm9ubnk=?= Microsoft Excel Crashes 0 18th Aug 2005 02:31 AM
Excel file - locked for editing Cristy Windows XP General 2 15th Apr 2005 03:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:16 AM.