Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 623
Default Opening macro file as read only

I have a macro which is executed via a custom button. It's often used on more
than one workstation at a time. The problem is that the second user gets a 'file
in use' error. Fortunately, they're allowed to choose to open it Read Only,
which solves the problem.

I'd like to avoid the error message if possible. Is there any way to tell a
custom button to open the file Read Only?

--
Regards,
Fred



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Opening macro file as read only

Fred,
Look at the 3rd argument to the .Open method :
<From the Object Browser
Function Open(Filename As String, [UpdateLinks], [ReadOnly],

Alternatively, make your file a template with the .xlt extension, then a
copy of the WB is opened each time instead of the actual WB.

NickHK

"Fred Smith" wrote in message
...
I have a macro which is executed via a custom button. It's often used on

more
than one workstation at a time. The problem is that the second user gets a

'file
in use' error. Fortunately, they're allowed to choose to open it Read

Only,
which solves the problem.

I'd like to avoid the error message if possible. Is there any way to tell

a
custom button to open the file Read Only?

--
Regards,
Fred





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 623
Default Opening macro file as read only

I know how to open a file read only within the macro, but I'm talking about the
initial execution of the macro.

I put a custom button on the tool bar, and assign a macro, can I tell the custom
button to open the file read only?

--
Regards,
Fred


"NickHK" wrote in message
...
Fred,
Look at the 3rd argument to the .Open method :
<From the Object Browser
Function Open(Filename As String, [UpdateLinks], [ReadOnly],

Alternatively, make your file a template with the .xlt extension, then a
copy of the WB is opened each time instead of the actual WB.

NickHK

"Fred Smith" wrote in message
...
I have a macro which is executed via a custom button. It's often used on

more
than one workstation at a time. The problem is that the second user gets a

'file
in use' error. Fortunately, they're allowed to choose to open it Read

Only,
which solves the problem.

I'd like to avoid the error message if possible. Is there any way to tell

a
custom button to open the file Read Only?

--
Regards,
Fred







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Opening macro file as read only

Well, how is your button opening the file ?

NickHK

"Fred Smith" bl...
I know how to open a file read only within the macro, but I'm talking about
the initial execution of the macro.

I put a custom button on the tool bar, and assign a macro, can I tell the
custom button to open the file read only?

--
Regards,
Fred


"NickHK" wrote in message
...
Fred,
Look at the 3rd argument to the .Open method :
<From the Object Browser
Function Open(Filename As String, [UpdateLinks], [ReadOnly],

Alternatively, make your file a template with the .xlt extension, then a
copy of the WB is opened each time instead of the actual WB.

NickHK

"Fred Smith" wrote in message
...
I have a macro which is executed via a custom button. It's often used on

more
than one workstation at a time. The problem is that the second user gets
a

'file
in use' error. Fortunately, they're allowed to choose to open it Read

Only,
which solves the problem.

I'd like to avoid the error message if possible. Is there any way to
tell

a
custom button to open the file Read Only?

--
Regards,
Fred









  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 623
Default Opening macro file as read only

You customize the toolbar, right click on the command button, and assign a macro
to it, which includes the file name.

Excel opens the file to execute the macro. How do I tell Excel to open the file
read only?

--
Regards,
Fred


"NickHK" wrote in message
...
Well, how is your button opening the file ?

NickHK

"Fred Smith"
bl...
I know how to open a file read only within the macro, but I'm talking about
the initial execution of the macro.

I put a custom button on the tool bar, and assign a macro, can I tell the
custom button to open the file read only?

--
Regards,
Fred


"NickHK" wrote in message
...
Fred,
Look at the 3rd argument to the .Open method :
<From the Object Browser
Function Open(Filename As String, [UpdateLinks], [ReadOnly],

Alternatively, make your file a template with the .xlt extension, then a
copy of the WB is opened each time instead of the actual WB.

NickHK

"Fred Smith" wrote in message
...
I have a macro which is executed via a custom button. It's often used on
more
than one workstation at a time. The problem is that the second user gets a
'file
in use' error. Fortunately, they're allowed to choose to open it Read
Only,
which solves the problem.

I'd like to avoid the error message if possible. Is there any way to tell
a
custom button to open the file Read Only?

--
Regards,
Fred













  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Opening macro file as read only

go into windows explorer, select the file, right click and select
properties. Change it to Read Only.

--
Regards,
Tom Ogilvy


"Fred Smith" wrote in message
...
You customize the toolbar, right click on the command button, and assign a
macro to it, which includes the file name.

Excel opens the file to execute the macro. How do I tell Excel to open the
file read only?

--
Regards,
Fred


"NickHK" wrote in message
...
Well, how is your button opening the file ?

NickHK

"Fred Smith"
bl...
I know how to open a file read only within the macro, but I'm talking
about the initial execution of the macro.

I put a custom button on the tool bar, and assign a macro, can I tell
the custom button to open the file read only?

--
Regards,
Fred


"NickHK" wrote in message
...
Fred,
Look at the 3rd argument to the .Open method :
<From the Object Browser
Function Open(Filename As String, [UpdateLinks], [ReadOnly],

Alternatively, make your file a template with the .xlt extension, then
a
copy of the WB is opened each time instead of the actual WB.

NickHK

"Fred Smith" wrote in message
...
I have a macro which is executed via a custom button. It's often used
on
more
than one workstation at a time. The problem is that the second user
gets a
'file
in use' error. Fortunately, they're allowed to choose to open it Read
Only,
which solves the problem.

I'd like to avoid the error message if possible. Is there any way to
tell
a
custom button to open the file Read Only?

--
Regards,
Fred













  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 623
Default Opening macro file as read only

Thanks, Tom. At least that gives me a workaround.

I have all my macros in one file, and some of them need to do saves. So the one
that gets used simultaneously, I can just move to another file that I'll set as
read only.

--
Regards,
Fred


"Tom Ogilvy" wrote in message
...
go into windows explorer, select the file, right click and select properties.
Change it to Read Only.

--
Regards,
Tom Ogilvy


"Fred Smith" wrote in message
...
You customize the toolbar, right click on the command button, and assign a
macro to it, which includes the file name.

Excel opens the file to execute the macro. How do I tell Excel to open the
file read only?

--
Regards,
Fred


"NickHK" wrote in message
...
Well, how is your button opening the file ?

NickHK

"Fred Smith"
bl...
I know how to open a file read only within the macro, but I'm talking about
the initial execution of the macro.

I put a custom button on the tool bar, and assign a macro, can I tell the
custom button to open the file read only?

--
Regards,
Fred


"NickHK" wrote in message
...
Fred,
Look at the 3rd argument to the .Open method :
<From the Object Browser
Function Open(Filename As String, [UpdateLinks], [ReadOnly],

Alternatively, make your file a template with the .xlt extension, then a
copy of the WB is opened each time instead of the actual WB.

NickHK

"Fred Smith" wrote in message
...
I have a macro which is executed via a custom button. It's often used on
more
than one workstation at a time. The problem is that the second user gets
a
'file
in use' error. Fortunately, they're allowed to choose to open it Read
Only,
which solves the problem.

I'd like to avoid the error message if possible. Is there any way to tell
a
custom button to open the file Read Only?

--
Regards,
Fred















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
file keeps opening as read only Sal Excel Discussion (Misc queries) 3 November 6th 08 10:43 PM
How do I stop a Excel 2007 file opening as read only? Will Excel Discussion (Misc queries) 0 September 1st 08 10:03 AM
How do I stop a Excel 2007 file opening as read only? Will Excel Discussion (Misc queries) 1 August 31st 08 11:14 PM
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. Tim Marsden Charts and Charting in Excel 2 October 15th 05 02:10 PM
File always opening as read only Larry Wallis Excel Discussion (Misc queries) 1 February 4th 05 02:22 PM


All times are GMT +1. The time now is 02:37 PM.

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"