Vba Coding For A Simple Clock
where can I get vba coding for a simple clock.
I would like the clock to be digital rather than analogue if possible
View Complete Thread with Replies
Related Forum Messages:
a way to turn excel into a world clock?
I am working for a company that has offices around the world, and I would like to see the time in all offices, when I am working in excel without using the internet (or spending monay on loads of wall clocks!)
Stop The Clock
Private Sub UserForm_Initialize()
lblCloseProgress1.BackColor = &H8000000F
lblCloseProgress2.BackColor = &H8000000F
lblCloseProgress3.BackColor = &H8000000F
lblCloseProgress4.BackColor = &H8000000F
lblCloseProgress5.BackColor = &H8000000F
Each of the timdown procedures adds another segment to the countdown clock (if you don't click "Exit" before the five seconds are up, the file closes without saving. All well and good.
Now, if you DO click the "Exit" button, you get a message that the close has been aborted and, upon clearing that messagebox, the file closes anyway!
I think it's something to do with killing all remaining OnTime instructions but I don't know how to go about stopping the clock.
Lockout Macro Clock
Can a group of cells or more be locked once they reached or passed a certain time frame and date that follows your PC clock, and can it be set to a time that you decide on in a macro. The other question, Can this lockout macro clock that was set to a pacific time frame can it stop people from altering their PC clock in anyway for e.g.; 'I tried to turn back the time but I got this message - "This cell is Locked due to your lateness".
How To Get An Actual Live Clock
I am looking to get a Live Clock changing every minute..
Lets say I put the Total Time in the Cell A2 = 15 minutes and I have a Command Button next to it "Start"..
On the Click Event I want the Actual Time time-stamped at that moment in the Cell A3 and in Cell A4 the Time should keep on Ticking...
Can someone attach a file in Windows 2003 i.e .xls format and also explain the code if possible.
Time Clock And Converting To 3 Min Increment
Okay I have a basic Time clock calculation in excel (i.e.-(timeout1-timein1)+(timeout2-timein2)="Total time"). What I need to do is convert the "Total time" to be changed to 3 min increments. I don't know if that is the best way to put it but let me show you the chart for the conversions.
3 mins=.05 hrs, 6 mins=.10, etc etc etc.
So lets put this into us
A1 (timein1)= 6:42 AM
A3(timein2)= 12:00 PM
A4(timeout2)= 5:00 PM (17:00)
So A5(Total Time)=9h 48min, but I need it to equal 9.80 hrs because with the conversion, 48 mins is .80 of an hour. So how can I set up A5 (Total time) to automatically do this calculation? This website is how I would like it to work http://www.1728.com/timecard.htm
Counting Hours Before And Past 6 O' Clock
In cells B8 and C8 an in- and out-time are given, in E8 the time in between.
Now I'd like to calculate the number of hours before 6 o'clock and the number of hours past 6 o'clock.
The formulas I came up with work great in the first example, but fail in the second, because the start day is on another day.
Time Related To 24hr Clock
What i try to achieve is: from 00:00hrs to 24:00hrs = 24hrs which is 1.0 day
Have made the attached spredsheet to calculate it correctly to 1 day. But if you look on the attachment the "total hrs" is saying 00:00 (it transfers to 00:00 when i am putting in 24:00). Basically how am I able to make Excel to display 24:00 insted of 00:00. Maybe there is an add ins availible like the pop up calendar but for times instead.
Time (clock) Times A Number
I have a start time in one column, end time in another and a column with the difference between the two. In another column I have profit. In the last column I have profit per hour where I divide the profit by the hours, but since one is hours and the other is a number it gives me an error.
Manual Time Clock For My Employees To Punch In And Out
I currently use a manual time clock for my employees to punch in and out. I then use Excel to tally their times. This is very tedious and error prone.
Is it possible to use Excel as the timeclock itself? I know that the employee can enter the time in a spreadsheet manually. But this also opens the door for error and potential dishonesty.
What I am looking for is, if the employee can punch in and out by doing a keystroke and Excel uses the computer's clock to timestamp.
Time Clock Six Minute Rounding Formula
I am trying to figure out the written formula for needing this answer:
For a time clock with 6 minute rounding.
If I type in 8:20 as the arrival time, I need it to round to 8:18, so that the final time will be in tenths.
Here is the rounding:
Actual Rounded Minutes in Time Clock
:57, :58, :59, :00, :01, :02
:03, :04, :05, :06, :07, :08
:09, :10, :11, :12, :13, :14
:15, :16, :17, :18, :19, :20
:21, :22, :23, :24, :25, :26
:27, :28, :29, :30, :31, :32
:33, :34, :35, :36, :37, :38
:39, :40, :41, :42, :43, :44
:45, :46, :47, :48, :49, :50
:51, :52, :53, :54, :55, :56
Anything in the same line will round to the bolded time.
Example: I arrive to work at 8:09 and go to lunch at 11:59, it will round to 8:12 and 12:00, making my time worked 3:48 or 3.80. Then I get back from lunch at 12:59 and leave at 17:14, which will round to 13:00 and 17:12, making my time worked 4:12 or 4.2 for the 2nd 1/2 of the day and 8:00 or 8.0 hours for the day.
Time In----------Time Out----------Total Time----------Decimal Time----------Total Hours
The problem is I want to write the actual time and not have to round everything myself and yet I need the decimal time to match what my time clock actually calculates from.
My current formula for the decimal shown above as 3.80 is this: =(HOUR(F7)*60+MINUTE(F7))/60
My current formula for the total time for the day (regular hours) is this: =IF((((E7-D7)+(I7-H7))*24)>8,8,((E7-D7)+(I7-H7))*24)
My current formula for overtime is this: =IF(((E7-D7)+(I7-H7))*24>8,((E7-D7)+(I7-H7))*24-8,0)
This is not a time clock, it is my personal copy of what my time for the week was/is, so that I can compare it to the actual time card that I have to sign off on.
I am trying to code a macro to run down through a column and hide the row if it finds a cetain marker (i.e. the letter "n") in the column, and then move onto the next one.
Lock Vba Coding
How it is possible to lock the VBA coding and Modules? I mean when Some one want to view VBA coding the Password window should not appear, istead of that a message box appears with message something like "Not viewable"
My spreadsheet calculates the date on a daily basis.
I would like to create a code in my spreadsheet which uses the year and month in question.
First, 2006 is is designated as a "3"
2009 "6" etc
Don't worry about anything prior to 2006.
Next, the months are represented by single digits. So, January = 1, February = 2, March = 3, April =4, etc. September is 9, and October = 10 but all the numbers over 9 have to be reduced to a single digit, so October = 1+0=1, November =1+1= 2, December =1+2= 3.
Now, the formula for the Month is:
Year + current Month
So, May 2007 = 4 + 5 = 9
June 2007 = 4 + 6 = 10 = 1
July 2007 = 4 + 7 = 11 = 2,
January 2008 = 5 + 1 = 6, etc
Coding A Macro In VBA
Is there a way of coding a macro in VBA that allows you, with one macro, to enter text in one cell and at the same time enter a value to the cell on it's right?
I don't want to name the cells, but I wondered if you could add to the code a piece of code that basically said "Select the cell to this cell's right and add the value x".
I have made this vba to go out and look at 2 different locations which contain simular folder names.
The script then writes the folder names in Column A, followed by the Size of both the folders from the 2 locations. The script is comparing the second location folder name to what the first process put in Column A so the folder names will be aligned with the file sizes. It is also converting the file sizes from bytes to the most appropriate one.
The problem I am having here, is once I put the second part in for the second folder, the script is either taking forver (More than an hour) or is freezing. So I am not sure if I put it in a loop somewhere or what exactly is happening. I am just wondering if I can get some help troubleshooting and optimizing this code....
Simple IF Function
If Channel A = Channel B, only fill "Primary Channel" (A or B)
If the Revenue A is bigger than Revenue B then take the Channel A as primary and secondary channel column as Channel B
if the Revenue B is bigger than Revenue A then take the Channel B as primary and Channel A as secondary
This is going to sound very simply to most here I'm sure. I have a need for a simple ledger, credit, debit, balance. I will only have maybe 12 accounts and want to keep track of hand written invoices and payments.
Here's what I would like: I return to my office, click on a tab for an account, enter the date and amount of an invoice in a debit column for that account. When payment is made, enter the amount received in the credit column. Having a running total in the balance column. A monthly statement option would be nice, but not necessary.
I have searched for templates of general ledgers and get results with budgets, projects . . . just too complex for my needs now.
Simple Loop To Get Value
I just like to do a simple loop but canīt seam to work it out.
I like to loop through column F and on the last cell or the first empty cell I like to get the sum.
how that works? I only find samples which donīt seam to help me much.
Also I would like to know a code to select all cells and rows and copy it into a different worksheet. Like cut and paste with vba.
Macro - Color Coding
I am trying to figure out how to run a macro for 1 particular workbook in an excel spreadsheet. I don't want it run on any of the other workbooks in that file, just the 1. I can't use conditional formatting because I need more than 3 values (if statements).
This is what one example of data in a cell and below is the color I'd like it to turn when I run the macro:
Anything that has a A: (which means an actual date it happened) I'd like the cell to turn blue. If there is an RT: (which means revised target) I'd like the cell to turn red which means it missed it's target date, and has been revised. If it has a TBD I'd like the cell to turn pink (or yellow or any color really). All other cells are just white. I don't know where to find the color codes in excel as well. Other samples of what cells look like are below.
Here is another example:
And final example:
Deactivate Coding Not Working?
I have placed the following code in my spreadsheet but it's not working!
the code after option explicit (now at the bottom) works, (thanks to Andy on here!) but all the disabling the right click and cut/copy/paste etc doesn't.
Color Coding Cells With Vba
I have a spreadsheet with cells containing different names. I want all of the cells containing the word Volitility to be colored one color, all of the cells with the word Momentum colored another color, and so on. I have more than three names so I cannot use conditional formatting. Attached is a workbook that has the uncolored cells in worksheet 1 and an example of what I want it to end up looking like in worksheet 2.
VBA Or Other Coding For Looking Up File Date
I am trying to learn how to use it in some of my Excel application. I am just wondering if someone would be willing to help what I am thinking would be a short string of code.
What I have is a list of files that I have compiled along with a name and description in cells B3 and C3 respectively. In cell E3 what I have is the path to that file which is linked so that I can click on it to access the file. Is there any way that I can write some kind of simple code to look up the last modified date of that file whose path is specifed and place it in cell D3.
Dynamic Range In Vba Coding
I'm trying to write a code which would place formulas in the row just below the my range (normally a matrix of figures) to sum the column in that just above that. Here's what I've got so far but it doesn't work.
Coding For Changing Worksheet Name
when the accounts exported to excel, all the tabs shown in the file are generated. However, i need to change tab '3' to tab '10' name to the name stated in tab 'menu'. eg tab 1 need to be renamed as 'BB' (not BB/Bunut), tab 2 to 'GEN' (not GEN/General), etc. All must be capital letter.
Colour Coding Cells
Is it possible to select a number of cells that are say yellow when blank but once someone type "N" or "No", they change to blue and if "Y" or "Yes" they change to green. I tried conditional formatting but it does not change the blank range to yellow until I have entered something into it.
Most Efficient Coding Method
In each VBA book I've read the authors will write their code like this:
nStart = UBound(GenArray1)
nEnd = UBound(GenArray2)
Redim preserve NewArray(nStart To nEnd)
Instead of the less line method of:
Redim preserve NewArray(UBound(GenArray1) To UBound(GenArray2))
Time (clock) Times A Number= Very High Number?
I have time start and time end and the difference between the two times. In a third column I have profit and want to calculate the profit per hour. When I divide the profit with the time spent I get a very very high number. If I for instance type in 1 hour of work and profit 100, then I get profit per hour 2400. (profit/hours spent)
On a side note I am trying to get the numbers as 24 hours and not use am or pm and in the spread sheet I get these numbers but in the box at the top where you see the formulas etc. it shows as am and pm. I have uploaded an example.
Simple Cell Value +1 Macro
I'm trying to write a basic macro which will increase the value in a cell by 1 when I click on the button I've made. I've searched for hours on the Internet, including this site, and found several websites which give a formula needed but none of them work, I always get an "Object variable not set" error or something about sub-functions which I can't recreate so I can't give the full error message. Sorry.
Based on what I've seen on the Internet, I currently have:
Send A Simple Email
i need to do is send an email via excel. In previous practice I have used the Activeworkbook.send method, but in this instance I dont want to send an attachment, all I need to do is send an email to someone, making use of the to: cc:subject and main body text fields.
Inputbox For Simple Verification
I have a VBA userform with various textbox fields like 'Name' and 'Address' and 'Amount'
I would like an input box to pop up that asks the user to 're-enter for verification'
So that they have to type the same thing twice, to protect against typos
How do I code it so the program compares the inputbox to the textbox and passes only if they are identical?
(or even, using two inputboxes instead if that would be easier)
Simple Code In 'Private Sub'
I usually create fairly simple macros using 'button' feature. However, now I'm using the 'CommandButton', as I had to make buttons highlighted once selected - So I have a choice of five options, whichever the user chooses that option background changes, the others stay grey...anyway, thats the fancy-editing done, but now when i enter a simple instruction - hide rows function - I get the error message "Select method of range class failed"
Here is the full code - like i say it works fine when its just the editing, but when i try to actually hide rows it doesn't work. - I will also add that the code is inside 'Microsoft Excel Objects' and further 'Sheet 1 (INDEX)' - not a module - I'm not sure if this is important.
Private Sub JackStart_click()
JackStart.BackColor = 32896
JackStart.ForeColor = 16777215
JackStart.Font.Bold = True
Majix.BackColor = 8421504
Majix.ForeColor = 0
Majix.Font.Bold = False
Selection.EntireRow.Hidden = True
Add Condition To Simple Formula
Using Excel 2003. I have a very basic SUM formula I am using to show how many forms are still in-house. Pretty simple.
Column D is how many came in.
Column F is how many were completed.
Column E is what is left.
To get the daily count I take the previous day's Column E, add to today's Column D and subtract today's Column F.
Puts the results in E3.
This formula is copied on down the worksheet which results in:
=(E3+D4-F4), with the results in E4. And so on down Column E.
The problem is that if there is no data entered in Column D or F, the results from E are carried (copied?) as far down as the forumla. i.e., if today's column E results in 4, then that is displayed for as far down as I have copied the formula. What I'd like to do is set the formula so that if there is no data in columns E or F, then there is nothing displayed in Column E.
Open In A Simple Window
Is there a way that I can make an excel sheet and save it in a way that when it's opened the person JUST sees the cells in a really simple window...
Not sure if I'm confusing people in how I explain this... but basically I don't want it to show the scroll bars, the A B C D etc and 1 2 3 4 etc, the tool bars... etc. JUST the specified cells in a sheet.
Simple Job Cost Sheet
The job cost controller is not exactly what I need, so I have been trying to create my own. So far my progress has got me to be able to separate each laborer for each job.
Here is my query: I have a drop down menu that lists ten different tasks(i.e. carpentry, painting, demo, etc.) and I want each of the ten tasks to separate themselves. Is this a vlookup function? How do I make excel listen?
Simple Insert Value Into Cell
What I would like to do is to insert the text "Agent" into the empty cell A# immediately above the block of names if "Agent" isn't already there. I'm having trouble with the syntax... The cell A# won't always be the same as the position of the block of names varies. In this case it's A9.
Making A Simple Chart
Im trying to create a bar chart that contains required hours per week with a line of hours worked going across the bars, im struggling to make this work and have basically no experience of making any sort of charts or graphs.
I need to create this using vba but to begin with I cant even make the chart manually! Where its all going wrong is the column line for required hours is so thin it looks rubbish. Its a bar chart then I formatted the series of total hours to be a line chart.
Simple Counting Cells
way to count cells in a spreadsheet (not values in the cells but just the cells themselves). So I have a whole bunch of cells, some are red, some are blue, some are green based on the info i have to keep track of.
so can i write some COUNTIF for red cells green cells, etc