Lock Spreadsheet After A Month From Creation?
Feb 12, 2014For each new case they have a spread sheet that they edit - I would like for this spreadsheet to lock a month after it is first edited/updated.
View 2 RepliesFor each new case they have a spread sheet that they edit - I would like for this spreadsheet to lock a month after it is first edited/updated.
View 2 RepliesI have the a file with the below Columnar format:
CoName April May June... till Mar
I have 15 Company Names. I need to create a file for every CoName-Month Combination.
CoName April
CoName May, etc
I do not want to create 15x12=180 files manually.
I currently produce excel reports for my company but need to somehow monitor how many times they are accessed and, if possible, when and by whom. All these excel files are situated on a server that our company uses and all users systems are connected to this. We use office 2003 and Outlook as the emailing system. My guessing is that the programming would have to intiate the usage file, amend it, and then close it each time a report is opened.
For each of the files that I want this file to monitor, I have written the following program which essentially opens up the usage file 'EPoS Usage' which is a simple grid, enters an extra one to the relevant counter cell then closes it. I really need to include a date and time for each opening and, if possible, get a username as well. Here it is:
Private Sub workbook_open()
Application. ScreenUpdating = False
Workbooks.Open Filename:= _
"S:Newman CommonCATEGORY MANAGEMENT - RangesEPoS Usage.xls"
Dim Counter As Integer
Counter = Cells(2, 8)
Counter = Counter + 1
Cells(2, 8) = Counter
ActiveWorkbook.Save
ActiveWindow.Close
Application.ScreenUpdating = True
End Sub
I have a database that I export to excel every month. The export process is built in the database software (ACT!2009). The export opens Excel with the standard Book1.xls file name. All the field columns will be the same every month.
Goal:
I need to format the spreadsheet to make it more readable and have been assigned the task of:
1 - Inserting a blank row between each row that contains data and filling in with color.
2 - Resizing the blank row to make it look like a "thick" border.
3 - Auto adjusting the columns to correct size.
4 - The last column contains comments and needs to be wrapped text.
5 - All of this needs to fit on 1 sheet (landscape).
Issues:
1 - Each month there will be a different number of rows.
2 - I know I can create a macro to do this but the macro that I would be creating will be in a saved template or spreadsheet. How could I use a that recorded macro in a spreadsheet that is called Book1.xls?
I have attached 2 spreadsheets. One called Book1.xls which is the raw data after exported and the 2nd spreadsheet called Formatted which is the end result that I am looking for.
I have a excel worksheet that I am looking to market and I want to give the prospective customer a 30 day free trial before purchasing my worksheet. What I would like to do it be able to lock the worksheet so it can not be used after 30 days and also display a message telling them that the trial period has ended. I would also like to keep all formula cells locked at all times to prevent unathorized copying of my calculations.
View 2 Replies View RelatedI am having difficulty with a Windows Media Player (WMP) object in my spreadsheet. I go to design mode and set the desired size of the object in the spreadsheet; I then save and exit. Next time I open the file the object is much smaller. In fact every time I open the spreadsheet; save the spreadsheet and exit it gets smaller and smaller!
How I can LOCK the bugger in place - ideally by using the corner points of the cells - For example Top Left Corner of A1 to Bottom Right Corner of T36.
I have the unlock/lock code below but i cannot get it to unlock the correct spreadsheet. Where do i need to place it in the code so that it will work properly.
Code to unlock:
Public Sub unlocksheet()
'unlock the worksheet
On Error Resume Next
ActiveSheet.Unprotect Password:="test"
Within this code:
Private Sub cmdSub_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("AFW")
'find first empty row in database
[Code] .........
I am trying to show the date in a spreadsheet as the month and the year.
The date is in B2 30/04/2012 and i want it to show in C2 as Month/Year.
I am currently using =month(B2) which shows it as a no ( 4 ). Can i make it show as month / year?
I have a simple VBS script that puts the username & current time in columns. When the user saves that time is also placed into a column.
I would like to be able to calculate the amount of time a user has spent on the spreadsheet for the current month & if possible the total time all users have spent on the spreadsheet this months.
Our spreadsheet pulls values from a column when a month is inserted in a certain cell:
OCT is typed in B2 and in the column below it, from B10 down to B286, data (numbers) are pulled from the October column K10 through K286 using =IF($B$2="Oct",K10,IF(and so on for each month). IF Nov is typed in B2 then the same happens except data is pulled from the November column, L. The monthly columns from K through V are tied to and updated
from other sheets. As you can see the problem is that nested functions allow only 7 and I need 12, one for each month. I have looked at the VLOOPUP and the HLOOKUP but our data is not set up that way (tables) since they need to be exact numbers pulled from the monthly columns that are tied to other sheets.
OCT (B2)
OCT NOV DEC
Complaint 3 (B10) 3
6
Inspection 10 (B11)
10 2
NOV 11 (etc)
11 5
Door Notice 1 and
so on
Recheck 32
Citation 2
Work Order0
Demolition 0
I m trying to write a formula for my financial model. If anyone can take a stab at a solution. I'm trying to write a formula that will equally distribute revenue either over the next 1 month, 2 month or 3 month period depending on size of the deal.
Details:
Sales will fit in 1 of 3 categories. Less than 25k; between 25k & 100k; greater than 100k.
- if under $25K, recognize in next month (month N+ 1)
- $25K-100K, recognize in two equal parts in months N + 1 and N + 2
- over $100K, recognize in three equal parts over 3 months
N + 1, N + 2, N + 3 ...
I am wanting to make a macro into an add-in. An add-in is basically a workbook with macros that is opened when excel is correct? I know how to create an additional menu item under an existing one, but I'm wanting to create my own menu with this add-in item under it. I've used this code to try and create the new menu and placed it in the workbook open:
HelpIndex = CommandBars(1).Controls("Help").Index
Set NewMenu = CommandBars(1).Controls.Add(Type:=msoControlPopup, Before:=HelpIndex, Temporary:=True)
NewMenu.Caption = "&Separate Cashiers"
But ran into an error on the first line of code. I saved the workbook with the add-in macro in it as an .xla and used the addins under tools to have it open each time.
I want to create a pop up message showing count of cells turned red,each time the workbooked are opened.like column "I" has two dates in red colour,so the pop up will say "you have 2 contracts expired"
View 8 Replies View Relatedis it possible to write a macro that will create a folder labled "2009" then a subfolder for each month with four subfolders labled "Week 1" through "Week 4", and have the "March", "June", "September", and "December" folders contain subfolders labled "Week 1" through "Week 5"?
View 2 Replies View RelatedI'm needing some code that will program-magically do the following interactive stuff:
1. Go to the first cell that will be the start of my range, say "D1".
2. While holding down the "shift" key, press "end", then "down". All of the desired cells will then have been selected. [side note: how can I detect that the "d2" cell is not blank - I don't really want 65K cells in my range?]
3. Next, "Insert", "Name", "Define", then typein the desired name range ("schoolList", here) and press enter.
This would seem to be a case for using the macro recorder but the range will always come out hard-coded, rather than the cells that would be selected using an "end" "down" selection.
I have a UserForm with a CommandButton; when I click on it a function creating dynamic checkboxes on another UserForm is implemented and then this second UserForm is displayed (and the dynamic checkboxes are displayed too).
Code:
Private Sub cmd_BUTTON_Click()
If MsgBox("Are you sure you want to add Dynamic CheckBoxes?", vbQuestion + vbOKCancel, "") = vbOK Then
UserForm1.Hide
UserForm2.Caption = "DYNAMIC CHECKBOXES"
Create_DynamicCheckboxes
End If
End Sub
Code:
Sub Create_DynamicCheckboxes()
Dim CheckBoxTop As Integer
CheckBoxTop = 75
Dim i As Integer
For i = 1 To 10
Set theCheckBox_ID = UserForm2.Controls.Add("Forms.CheckBox.1")
[Code] .........
Everything work fine!!!
Now I have the UserForm2 displayed that include 10 CheckBoxes, which names should be:
chk_1chk_2chk_3chk_4chk_5chk_6chk_7chk_8chk_9chk_10
Why the following code doesn't work???
Code:
Private Sub chk_1_Click()
MsgBox(chk_1.Value)
End Sub
In the new 2007 version , can a specific hot key be created to perform Past Special Values? This key assignment was available in 2003, but we can't find it in the new 2007.
View 9 Replies View RelatedI want a marco for excel which does the following task
There are there are two worksheets namely Sheet1 & Sheet2 in the same workbook.I want to create multiple (new) worksheets in the same workbook based upon the number in cell A2 of sheet1. Further the new sheet that has been created shall be same as Sheet2.
Suppose the value in A2 is 2, then the macro shall create two new worksheets (whose data is same a sheet2).
This might be a little complex to understand but I am going to try to make it clear as to what I am in need of. Basically I have a larger macro that runs and I need to add a pop up that asks for a percentage to be put into a new sheet. The percent is the percent of random rows on the current sheet to be put into a new sheet. Then it would have to create the new sheet with the random information. This is for a audit and we want to have it done randomly and no duplicates. There are no duplicates in the list at this point. The width if needed is from column A to column E.
View 2 Replies View RelatedI write macros that creates a treeview according to data from column "A". In attached example I have series of numbers, that means following:
0 is a root (A1), 1 is its nod (A2), 2 are nods of 1 (A3,A4), three appearance of 3 are nods of 2 (A5,A6,A7) , e.t.c.
It means that I must dinamically to create the loops.
How to make it.
All that I know is a static creation.
I'm preparing a model which has a few macros built-in. Let's call them Macro A, B, C etc. I want to trigger them via buttons on a custom toolbar (no problem) which a recipient of the model, on another PC, will be able to see (problem).
It was suggested to me that in Customize mode I can right click the custom toolbar and then click "Attach..." but this always causes Excel (2002) to freeze; I must then close Excel.
Someone else suggested that a better way is to have VBA code create the toolbar "on the fly" automatically when a recipient opens the spreadsheet. This is too advanced for me to write at the moment. Could someone give me a steer?
i am SAP developer and i m working on SAP - excel integration. i am fetching data from SAP tables in to excel and in each row of the excel i want to create a dynamic list box and populate dynamic values.
i know the logic for data fetching but not logic for cretion of list box dynamically and handling events of dynamic list boxes..
I just realized that after create 1200 checkboxes using VBA then excel will prompt an error. Something like object automation bla...bla....bla. What Is the shortest code with VBA to create 2000 checkboxes? I run copy paste function with VBA but seems not working well.
View 7 Replies View RelatedI need a macro to copy the data from the rows in Sheet3 into a specific place on "Sheet2" (Column "C" to E10 on Sheet2, D to E11, Q to E12, R to M12, S to T12, G to Y26, H to AF29, M to AF30, N to AF32, and lastly the current date to AC10) then rename the sheet to the Value of "E10" on that sheet then Copy that sheet to a new workbook and then clear the data on "Sheet2" so that only the information that was on the sheet before the data transfer is left and reset the name back to the original. My problem is i'm going to need this macro to do this for every row of data (Customer) that is in my list range of B10:R2114. So i'm looking for maybe a macro that loops an amount of times equal to the counts of data in the address range
=count(D10:D2114)
I have a macro that Creates a new workbook (which you name and place, which is good) and then copies a specified sheet over to the new workbook. I hope I wasn't to convoluted in what I'm trying to accomplish. heres the current macro I'm working with.
Sub copySht()
'declare the variables
Dim wb As Workbook
Dim ws As Worksheet
Dim fName
With Application
'prevent unnecessary error messages
.DisplayAlerts = False
'switch off screen updating to speed up code and prevent screen flickering
.ScreenUpdating = False
do you know if there is vba code to lock formulas so someone sees but does not touch and the same for values see but cant change??
my sheets with formulas are SUMMARY and Sheet2
sheet with value is TABLE
Trying to automate footer creation, center header sets ok then errors out on left footer with
Runtime error 1004 : Unable to set LeftFooter property of the PageSetup Class
if I comment out the left footer line the center sets ok then stalls with the same error on the right footer
VB:
For Each WS In Worksheets
With WS.PageSetup
.CenterHeader = "&""Calibri""&22 &B" & msg9 & vbLf & "&14 &B" & msg1
.LeftFooter = "&""Calibri""&11" & msg2 & " " & msg3 & vbLf & "Owner: " & msg8
.CenterFooter = "&""Calibri""&11" & msg4 & vbLf & "&11 &B &K4a0c80" & msg5
.RightFooter = "&""Calibri""&11" & msg6 & vbLf & msg7
End With
Next
I would like the individual cells of C1 and D1 to allow me to input values up to 100. The tricky part is that if D1 equals 100 I would like C1 to be less than 100 and vice versa, if C1 equals 100 then D1 should equal less than 100.
Ex. C1 = 100 & D1 = 10
This should never happen: C1 = 100 & D1 = 100. I would also like an error box to show when either of the cell values exceed 100.
What I am looking to do is have a calendar on a worksheet that populates with dates from multiple worksheets across the workbook. I've got approximately 15 worksheets to pull dates from. Within each worksheet I have a table with 5-10 check options (Form control check boxes). When an option is checked, several dates appear going across the rows on the table. The dates in each row have several date ranges. For example, if I check option 1, I will get 4 separate date ranges of varying amounts of time. I would like these date ranges to then populate on the calendar. All worksheets should populate the same calendar. As each worksheet may have similar options, I would like the listing on the calendar to state Worksheet Name - Option Name for it's entry onto the calendar.
I've looked at the design of the calendar provided by Pete_UK and it looks like something that would work for me.
I've included a condensed version of the spreadsheet I am working on as well as the calendar created by Pete_UK.
How to create an audible alert in XL. To be more specific, I would like the system to alert me on various due dates for the data entered. The key filed is the DATE. The due dates for re-validation could be between 07 days to 3 years.
View 2 Replies View RelatedI need to create a lot of web queries to extract data from several webpages. The web pages all have the same url except the last string of numbers, e.g. ww.somewhere.com/lookup.html?type=[x] where [x] is just one or more integers that are in sequential order.
I want to create around 50 web queries (maybe more later) without doing this manually. Is there any way to put these urls in a column and have excel read through them and query the data?