#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Open File with VBA

Hello everyone-

I have a code that opens an existing excel file but, if someone is already
in the file, it does not pop up a window that says which user is currently in
the file. Can some add to my coding so that when the file is opened and
someone is in the file it will identify who is in the file? Thanks.

Sub Open_Wiresheet()

Dim objExcel As Object
Dim SchedWkbk As Workbook


On Error Resume Next
Set SchedWkbk = Nothing

Set objExcel = CreateObject("Excel.Application")


Set SchedWkbk = objExcel.Application.Workbooks.Open _
("O:\SEM\Common\Accounting\May-07 Wire Transfer Schedule.xls
") ' WIRE TRXFER FILE
objExcel.Visible = True
On Error Resume Next


If SchedWkbk Is Nothing Then
Msgbox prompt:="Cannot find file. Please open file manually", _
Buttons:=vbOKOnly + vbQuestion

End If

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Open File with VBA

http://support.microsoft.com/Default.aspx?kbid=291295
--
Gary''s Student - gsnu200724


"David T" wrote:

Hello everyone-

I have a code that opens an existing excel file but, if someone is already
in the file, it does not pop up a window that says which user is currently in
the file. Can some add to my coding so that when the file is opened and
someone is in the file it will identify who is in the file? Thanks.

Sub Open_Wiresheet()

Dim objExcel As Object
Dim SchedWkbk As Workbook


On Error Resume Next
Set SchedWkbk = Nothing

Set objExcel = CreateObject("Excel.Application")


Set SchedWkbk = objExcel.Application.Workbooks.Open _
("O:\SEM\Common\Accounting\May-07 Wire Transfer Schedule.xls
") ' WIRE TRXFER FILE
objExcel.Visible = True
On Error Resume Next


If SchedWkbk Is Nothing Then
Msgbox prompt:="Cannot find file. Please open file manually", _
Buttons:=vbOKOnly + vbQuestion

End If

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Open File with VBA

do u have a macro that will identify who is currently in the file if I am
trying to access it? Thanks.

"Gary''s Student" wrote:

http://support.microsoft.com/Default.aspx?kbid=291295
--
Gary''s Student - gsnu200724


"David T" wrote:

Hello everyone-

I have a code that opens an existing excel file but, if someone is already
in the file, it does not pop up a window that says which user is currently in
the file. Can some add to my coding so that when the file is opened and
someone is in the file it will identify who is in the file? Thanks.

Sub Open_Wiresheet()

Dim objExcel As Object
Dim SchedWkbk As Workbook


On Error Resume Next
Set SchedWkbk = Nothing

Set objExcel = CreateObject("Excel.Application")


Set SchedWkbk = objExcel.Application.Workbooks.Open _
("O:\SEM\Common\Accounting\May-07 Wire Transfer Schedule.xls
") ' WIRE TRXFER FILE
objExcel.Visible = True
On Error Resume Next


If SchedWkbk Is Nothing Then
Msgbox prompt:="Cannot find file. Please open file manually", _
Buttons:=vbOKOnly + vbQuestion

End If

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
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
Open email windows can't open, excel shreadsheet file .xls ? skiz Excel Discussion (Misc queries) 0 October 2nd 05 07:03 PM
file open via IE hyperlink causes already open files to shrink and tile Marc Setting up and Configuration of Excel 0 May 4th 05 08:13 PM
How do I stop Excel from closing the open file each time I open a. Welsin Setting up and Configuration of Excel 3 January 8th 05 11:16 PM


All times are GMT +1. The time now is 01:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"