Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel-file on a p2p network.
It has a password so that most network-users can open it for reading and only some are able to change it (after they have entered the password). *** I would like to make certain buttons available only when opened by the latter and not available when opened "read-only". *** Any ideas are welcome! The password is added the "normal" way (Save As + Extra and enter the password), so it is not programmed in some VBA routine or so (don't even know if this can be done and this isn't my question either). Jan V. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assume you have 3 buttons placed on the worksheet "Sheet1"
The names of the 3 buttons a "Button 1", "Button 2", "Button 3 Place the following macro into the "Thisworkbook" of the Excel file If the file is opened as read only, the buttons will not be displayed; vice versa '----------------------------------------------------------------- Private Sub Workbook_Open( Dim tmp As Boolea tmp = Not ThisWorkbook.ReadOnl With ThisWorkbook.Worksheets("Sheet1" .DrawingObjects(Array("Button 1", "Button 2", "Button 3")).Visible = tm End Wit End Su '----------------------------------------------------------------- Regards Edwin Ta http://www.vonixx.co ----- Jan V. wrote: ---- I have an Excel-file on a p2p network It has a password so that most network-users can open it for reading an only some are able to change it (after they have entered the password) *** I would like to make certain buttons available only when opened by th latter and not available when opened "read-only". ** Any ideas are welcome The password is added the "normal" way (Save As + Extra and enter th password), so it is not programmed in some VBA routine or so (don't eve know if this can be done and this isn't my question either) Jan V |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jan,
Workbooks have a ReadOn ly property that you can test If ActiveWorkbook.ReadOnly Then ActiveWorkbook.SaveAs fileName:="NEWFILE.XLS" End If-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jan V." wrote in message ... I have an Excel-file on a p2p network. It has a password so that most network-users can open it for reading and only some are able to change it (after they have entered the password). *** I would like to make certain buttons available only when opened by the latter and not available when opened "read-only". *** Any ideas are welcome! The password is added the "normal" way (Save As + Extra and enter the password), so it is not programmed in some VBA routine or so (don't even know if this can be done and this isn't my question either). Jan V. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I toggle in and out of read-only status in an Excel file? | Excel Discussion (Misc queries) | |||
How do I clear read-only status on a workbook file? | Excel Discussion (Misc queries) | |||
How to hide Sheet tab Bar & status Bar for a excel file | Excel Worksheet Functions | |||
How do I print the read-only status of Excel file? | Excel Discussion (Misc queries) | |||
File Read-Only Status | Excel Programming |