Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
in addition to my previous question, when the file saves over the read only
file, i would like it to make it a read only again. thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
that is why VBA provides the setattr command. Read about it in help.
-- Regards, Tom Ogilvy "lawson" wrote in message ... in addition to my previous question, when the file saves over the read only file, i would like it to make it a read only again. thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try to keep things in one thread. Makes it easier on all concerned... Give
this code a try... Public Sub SetReadOnly() Shell ("Command.com /c Attrib C:\Test.xls +r") 'Make Read Only Shell ("Command.com /c Attrib C:\Test.xls -r") 'Undo Read Only End Sub This uses a file on the C Drive called Test.xls -- HTH... Jim Thomlinson "lawson" wrote: in addition to my previous question, when the file saves over the read only file, i would like it to make it a read only again. thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Why resort to shelling a "DOS" command if you can do it fine within VBA?
-- Regards, Tom Ogilvy "Jim Thomlinson" wrote in message ... Try to keep things in one thread. Makes it easier on all concerned... Give this code a try... Public Sub SetReadOnly() Shell ("Command.com /c Attrib C:\Test.xls +r") 'Make Read Only Shell ("Command.com /c Attrib C:\Test.xls -r") 'Undo Read Only End Sub This uses a file on the C Drive called Test.xls -- HTH... Jim Thomlinson "lawson" wrote: in addition to my previous question, when the file saves over the read only file, i would like it to make it a read only again. thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
it is just a different way of skinng the same cat. I agree with you on the VB
function. Sometimes dos is kind of handy though (and I remember it better than some of the functions in VB). -- HTH... Jim Thomlinson "Tom Ogilvy" wrote: Why resort to shelling a "DOS" command if you can do it fine within VBA? -- Regards, Tom Ogilvy "Jim Thomlinson" wrote in message ... Try to keep things in one thread. Makes it easier on all concerned... Give this code a try... Public Sub SetReadOnly() Shell ("Command.com /c Attrib C:\Test.xls +r") 'Make Read Only Shell ("Command.com /c Attrib C:\Test.xls -r") 'Undo Read Only End Sub This uses a file on the C Drive called Test.xls -- HTH... Jim Thomlinson "lawson" wrote: in addition to my previous question, when the file saves over the read only file, i would like it to make it a read only again. thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Read only file is NOT Read only | Excel Discussion (Misc queries) | |||
I have a read only xl file, I need it to be read and write | Excel Discussion (Misc queries) | |||
XCEL FILE REC'D AS READ ONLY -- HOW TO NOT BE "READ ONLY" | Excel Discussion (Misc queries) | |||
How can a file be converted from Read-Only to Read/Write | Excel Discussion (Misc queries) | |||
read from 1 cell read to and other using vba | Excel Programming |