After Opening Change To Read Only
Dec 4, 2008Is there any way of once a spreadsheet is opened after a set date has passed it automatically changes to Read Only?
i.e. after opening the properties change to Read Only
Is there any way of once a spreadsheet is opened after a set date has passed it automatically changes to Read Only?
i.e. after opening the properties change to Read Only
I have created an Add-in for use across the business, the add in calculates financial impact based on figures that are stored on the shared drive.
The addin currently opens the workbook, and sets the variables to figures contained in the workbook - and then closes the workbook.
To roll this out to the business - I need to get the add-in to open the workbook as read Only, so that it will allow multiple users to access at once. I have set to open as read only in the past - however this prompts me to save the workbook as something else.
Is there any way I can get this to just open as read only, do what it needs to - and then close; without having the option to save as something else?
I have a workbook which has a macro to loop round refreshing its data every half an hour and each time the refresh is performed the file gets saved. This file is opened by one user in the morning, and left open with the macro running to carry out the refreshing throughout the day. This workbook is then also opened by a number of users as read only who interrogate (but do not update) the data in the spreadsheet as part of their work. Periodically, they close and re-open their copy of the workbook to ensure they have the most up-to- date version open.
To let them know when a new version is available (i.e. when the refresh has been performed and the file re-saved), I have some code which compares the last saved date/time of the file they are using with the date and time of the file they loaded the file from, and displays a message when they values are different. I have, however, been unable to develop a macro which properly 're-loads' the workbook. I have been able to get the file closed and the latest version opened (through a 'ThisWorkbook.Open' statement). However, when the new version susbsequently opens, none of the open events are triggered, nor is the Auto_Open macro executed. This is a major problem, as the spreadsheet relies on this processing being performed for the file to properly work. (I know that macros are enabled (I get the 'enable macros' prompt in the course of the updated version being opened, and can run macros once the file has been opened).)
I have a shared document that I want other team members to enter data only into. For some reason when they open the shared document it is showing as read only to them how to fix this? See below settings used
View 2 Replies View Relatedway of changing the mode of a workbook to readonly upon opening it.
View 6 Replies View RelatedIs there a way of reading .csv files and copying the data from say Sheet1 without actually opening the file itself? I have .csv's that will take some time to open due to size so dont really want to open them, but want to copy the data from all of them within a specific folder.
I am running windows 7 x64 and office 2010 x64.
I have a shared Excel Workbook, and I am trying to prevent a non-permitted user from making any changes to it. I have managed to hide all of the worksheets bar one - The Warning Page - if the user is not one of my chosen users, but I am having a little trouble setting the worksheet to open as "read-only" if the user is not one that I have listed.
My macro code looks a bit like this:
If Application.UserName = "Vikki" Then
Sheets("Warning!").Visible = False
Sheets("Total").Visible = True
Else
Sheets("Warning!").Visible = True
Sheets("Total").Visible = False
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End If
But when I am using this, a non-user will get a msg box asking if they want to save the workbook before changing to read only. Can I prevent this msg box from appearing?
The code below is for a Userform to allow data to be entered into a form and than placed into a worksheet. Also this code allows me to edit the existing data in the worksheet and than place the data back into the worksheet when down editing.
The problem is some of the data in my userform are numbers and the userform is reading it as text. When I enter numbers into the userform and than place it into the worksheet, how can I change the code so that the userforms to recongnize numbers not a text?
Private Sub UserForm_Initialize()
With ActiveCell
If .Value = vbNullString Then
With .Parent
Set myCells = .Cells(.Rows.Count, 1).End(xlUp).Offset(1, 0)
End With
Else
Set myCells = ActiveCell.EntireRow.Range("A1")
End If
Set myCells = myCells.Resize(1, 28)
End With
Call FromSheetToUserform
Me.txtTYPE.SetFocus
End Sub
Sub FromSheetToUserform()
Dim myData As Variant
myData = Application.Transpose(Application.Transpose(myCells.Value))
If myData(1) = vbNullString Then myData(1) = Format(Date, "Medium Date")
With Me
.txtDATE.Text = CStr(myData(1))
.txtTYPE.Text = CStr(myData(2))
.txtIDENT.Text = CStr(myData(3))
.txtROUTE.Text = CStr(myData(4))
.txtTOTAL.Text = CStr(myData(5))
.txtSEL.Text = CStr(myData(6))
.txtSES.Text = CStr(myData(7))
.txtMEL.Text = CStr(myData(8))
How mould i change 66 to read 00:01:06 i.e. 1 min 6 seconds? i know i'ds use mod and int but not sure how.
View 2 Replies View RelatedI am trying to turn off DisplayCommentIndicator when anyone opens this one file. I started with this not sure why its not working.
Private Sub Workbook_WindowActivate()
Application.DisplayCommentIndicator = xlNoIndicator
End Sub
also after anyone closes the file turn the comment indicator back on.
Pls see below codes, the codes can record down changes made "from" and "to" and put on the "Log" sheet, however it is unable to capture the original values when I first open the file and make the changes.
Also, how can I put the value of "Now" in column B?
Code:
Dim PreviousValue
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value PreviousValue Then
[Code].....
I'm trying to open a file on a network drive...but I'm getting the following error message when it opens: "This file may be read-only, or you may be trying to access a read-only location. Or the server the document is stored on may not be responding." Now, the file itself has no rights restrictions and is not read only. It doesn't appear to be locked.
Now, there are other Excel files in the same directory which I could open fine; however, the Excel documents having the above problem all have a little black icon "appears to be a padlock" (image attached) at the bottom left hand side of the Excel file icon. I tried the following:
- Renaming
- Converting to a different file format (didn't work, it won't let me)
- Opening in notepad...etc doesn't work.
This file is dated back in 2004...do you think it's corrupt? Is there anything i can do to open or recover this?
I have a need to open a file from my companies intranet. My current method was to open said file via the method that the recorder gave me. However, I would like ot be able to open a said file without having to start open another workbook.
This is the path:
[url]
So the command is this:
Workbooks.Open [url]
Links are not actual links
So what I need to know. Is how can I open this file without opening a workbook. I haven't been able to use the VB "Open Statement" to open a file and I don't believe that I've been successfull using the Filesystem object either.
i m wishing to make a ss available to all but only ready only format 2 people need access to ammend the data and spreadsheet.
View 2 Replies View RelatedI've created an add-in. When I try to update the coding in the add-in, Excel reports that the add-in is read only and prompts me to choose another name for it. However, it is not currently selected in my Tools -> Add-ins... window.
View 9 Replies View RelatedSimply stated:
Range("A5") = Qty
Range("A6") = Cost
Range("A7") = Cost * Qty
In the UserForm:
TextBox1 fills Qty range
TextBox2 fills Cost range
I'd like to have TextBox3 to show the result on Range("A7"). This box would not be enabled, therefore is not clickable or Tab accessible.
I tried
Private Sub TextBox3_Change()
TextBox3.Value = CStr(Range("A7").Value)
TextBox3.Text = Format(TextBox3.Text, "Currency")
End Sub
but that does not do it.
Lately I've been learning how to pluck data right from a web page:
for instance,
cageNum = IE.document.getElementById("txtCage").Value
will read the info right out of the txtCage textbox at the page where my IE object is.
Now I'd like to read a table into excel. How is that done?
I used to read *.txt file into C/C++ program?
Now from Yahoo downloading stock prices, they are in EXCEL *.csv format. How can read them into C/C++ program?
I've got an excel sheet from a guy at work who decided to lock the entire document down so I can't do anything with it. Virtually all the ribbon options are greyed out, there isn't anything locking it in the code, I've tried checking the save as "read-only" option and it's not there. How I can actually save this is editable? I've looked in windows explorer and it's not read-only in there either. I tried save-as and even tried making it an XLS instead of an XLSM and it still won't let me edit it
View 1 Replies View RelatedThe xls file I have written is used by multiple users at the same time. None of them can actually change the file - it opens data files and imports the data it needs then writes back any changes to the data to those files.
So the "read-only" option that my users see is of no importance to them - can this be bypassed somehow?
I have a text file that I want to read the data into a sheet and split and store into columns.
The format of the textfile as follows (Only two records will contain 200 with line break to seperate):
Atom "file" contains: C:B_200801142021_VIDEO_BOYS_EVENTS_FIRSTBIRTHDAY@Video Title 1.mp4
Atom "©nam" contains: Video Title 1
Atom "purd" contains: 200801142021
Atom "keyw" contains: VIDEO_BOYS_FIRSTBIRTHDAY
File "F_©nam" contains: Video Title 1
File "F_purd" contains: 200801142021
File "F_keyw" contains: VIDEO_BOYS_FIRSTBIRTHDAY
Raw data:
1 acct01 John Doe 10
2 acct01 Hits 20
2 acct01 Runs 05
Goal:
1 acct01 John Doe 10 20 05
For a couple of reasons I have had to take a workbook off of a local machine and place it on the network so others can access it. I cannot share the workbook because of the macro's and protection on it. At any one time only one person should have full control of workbook. The others only need read only access. I won't go into the whole deal but I was hoping there was a way on startup to detect if the workbook is in read only mode or not (Other than the basic notifications and indications that excel gives as many users either ignore or do not understand them). If so I would like a big message to popup stating this fact to the user and also if possible show them who currently has it open. Lastly, they would have a cancel workbook open option until they get the other user to exit.
View 2 Replies View RelatedIs that possible that I can make an excel file as a read only through code... and if needed should be opened by giving password ?
View 6 Replies View RelatedI have a formula that puts a date into a format I want to read date from a data base.
[Code] ..........
Output is correct = '17-03-2014' if the date is greater than or equals to the 10th but if its the 1st for example I get '1-03-2014' which is wrong as I need the zero to count the date properly. I tried a Left formula on a date field to bring in the first 2 digits but because its a date it returns for example 41 instead of 17 if its the 17th. I was going to do a Left(Text type of formula and place it into an if statement but that didnt work.
I know how to pull an entire text file
into an Excel Spreadsheet, but I only want specific information from
the text file not the entire text file.
What I have is about 25 text files stored in a folder, let's say
C: est.
Each file is named by a property address as follows:
209 MAIN ST.txt
213 MAIN ST.txt
111 ELM ST.txt
2356 WOOD AVE.txt
On the 11th row of each file is as follows:
Property Address:209 MAIN ST
On the 31st row of each file is as follows:
Total Value:30500
What I would like to do is read each file located in the "C: est
folder and write a record (row) into a single Excel Spreadsheet for
each property. I would like the Excel Spreadsheet to look as follows
once completed. Note the 1st row below is a header row that needs to
be generated by the code.
Property AddressTotal Value
209 MAIN ST 30500
213 MAIN ST 60700
111 ELM ST 20400
2356 WOOD AVE 20900
Can I read a header list (in a spreadsheet, text file, or hard coded in
the code) which I would prefer the spreadsheet or text file method,
write the header row in A1 then B1. Next read the 25 text files and
search based on the header info written above (Property Address & Total
Value) and write the appropriate to the single spreadsheet. The 11th
row of the First text file value written in cell A2, then read the 31st
row of the First text file write the value in cell B2, then loop to the
Second text file and values from The 11th row of the Second text file
value written in cell A3, then read the 31st row of the Second text
file write the value in cell B3, so on and so forth until the last text
file is read and the last record is written.
I have a set of Hex Code a total of 4 Sets :
A4EC 9ACF 4A02 044E
1. What i need to do is Read the 1st Character in the Hex Code which say A now.
2. Now I need to find if there is another A in this Hex Code. If yes - e.g
A4EC 9A - I need to find the difference between A-A. How many characters are in between the 2 A-A. So for this I have A 4EC9 A so the difference is 4.
2.1 - Another Senario of "A" - A 4EC9ACF4 A the difference is 8 characters
3. Next we will move on to the next Letter which is 4 and do our search.
The key is i only want to record those Hex code which have a difference of 4,8,10,12 differences.
So for that above example I should be able to record the following :
A 4EC9 A == 4 letter difference
4 A020 4 == 4 letter difference
A 4EC9ACF4 A == 8 letter difference
4 EC9ACF4A020 4 == 10 letter difference
E C9ACF4A02044 E == 12 letter difference
I took two weeks perfecting an Excel file and was writing them to disc just now to transport and use on other machines. I opened the file to add instructions and the files are now read only? Propteries show read only on the written files but not on the originals???
View 4 Replies View RelatedI've been trying to use IF OR and CONCATENATE to read 4 cells and give me a list of parts needed based on the data loaded in the 4 cells. I attached an example showing.
View 2 Replies View RelatedI am trying to get a SUM function to recognise values within a range of cells, that are immediately followed by a *. i.e. 34*
For each range i need to count the total number of inputs, count the number of starred inputs & add up all the values entered.
Currently COUNT doesn't recognise starred values, COUNTIF is set to count only starred values, and SUM wont recognise the value of the starred values.
Is there a way to only read the number element of an input - there are only integer values & starred integer values. The starred inputs are also conditionally formatted. If there is a way would it then affect the COUNT/COUNTIF element?
Pedro