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: 57
Default Alerting user if file not open

Dear Wise Ones,

I am wanting to prompt users to open the required file if not already open.
There is some nearly-helpful answers in these posts, but I can't quite
achieve what I want.

This code of mine is useless because errorMsgs executes whether error or not.

Set rotaBk = Workbooks("EAA.xls")
rotaBk.Activate
On Error GoTo errorMsgs
errorMsgs:
MsgBox ("Open EAA.xls ")
Exit Sub


If I try to put a condition on error handling execution:

If error then
MsgBox ("Open EAA.xls " & error)
exit sub
end if

I get a "type mismatch" in the error MsgBox

As always, help most appreciated,

matilda
 
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
User replaces existing file with blank during file open sjs Excel Discussion (Misc queries) 3 August 18th 08 06:16 PM
File is already open by user X eagle13 Excel Discussion (Misc queries) 1 July 24th 06 01:14 PM
not being prompted that user has file open maryj Excel Discussion (Misc queries) 0 December 15th 05 03:10 PM
How to ask user for file to open Dwaine Horton Excel Programming 2 February 18th 04 07:48 AM


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

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"