Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default downloading excel file for open causes "file is locked for editing

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
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
how to unlock a file that is "locked for editing" Catherine Excel Discussion (Misc queries) 4 September 21st 15 08:39 AM
Delete a "locked for editing file by..." an Excel Worksheet Functions 3 September 24th 08 06:22 PM
"Locked for Editing" error on a non-protected file Jim Murray Excel Discussion (Misc queries) 1 March 8th 08 11:42 AM
file.xls is locked for editing by "user" Mack Neff[_3_] Excel Worksheet Functions 2 June 26th 07 02:58 AM
Trying to Open Excel File, But its says file is locked for editing Smeeta Geary Excel Discussion (Misc queries) 1 September 20th 05 01:28 PM


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