Thread: Read Only
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Read Only

dim wkbk as workbook
set wkbk = workbooks.open(filename:=yourpathandfilename, readonly:=true)
application.run "'" & wkbk.name & '!hiderow"





Gisela wrote:

I have a macro that is called from different workbooks. This macro hides
unused rows. It was define as Sub HideRow() in Module 2 of Entity_LOB_PST
file.

If more than one person is calling the macro from different workbooks, they
get a message €śfile is being used by another user€ť.

The macro is called from the different workbooks using the following
statement:
Application.Run "'" & Path2 & "Entity_LOB_PST.xls" & "'!HideRow"
where Path2 is the location of file Entity_LOB_PST

Is there any way to eliminate this message an open the macro as read only?
Please, help!


--

Dave Peterson