Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


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

Sponsored Links:

Related Forum Messages:
VBA Coding
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.

View Replies!   View Related
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"

View Replies!   View Related
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".

View Replies!   View Related
VBA Simple Right Function
Is there any reason why this wouldn't work in Excel 2007 despite working fine in 2003?

.Range("C2:C15132") = Right(.Range("C2:C15132"), 7)

View Replies!   View Related
Coding Multiple Cases In VBA
I am writing VBA code to do the following:
IF A1 > 50 then print array C1:E7

I have this code and it works.

View Replies!   View Related
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.

View Replies!   View Related
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.

View Replies!   View Related
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.

View Replies!   View Related
Can You Use VBA Coding To Sort By More Then 3 Criteria
I was wondering if there is a workaround for sorting in Excel by MORE THEN 3 CRITERIA?

I have seen a couple of solution doing 2 seperate sorts but was wondering if you can write code to expand on Excels limited sorting capabilities?

View Replies!   View Related
VBA Coding To Detect Internet Connection
Afternoon All - i have an excel workbook that runs on 20 remote machines that i do not have direct access to - i am placing upgrades on the net but looking at finding a way for excel to detect the update what i need it to do first is check if the machine is connected to the internet.

View Replies!   View Related
Unique Count Of Range - Vba Coding
how to count unique records, and I can only find formulas, and not code. This code works fine, and I get the right "actual" count, but I need to change it to a unique values count.

Sub CountEmployees()
lastrow = ActiveSheet.UsedRange.Rows.Count
For t = lastrow To 2 Step -1
If Cells(t, 8).Value <> "" And Cells(t, 8).Offset(2, 4).Value <> "" Then
Cells(t, 12).Select
Selection.Offset(1, 0).Select
Range(Selection, Selection.End(xlDown)).Select
List = Selection.Cells.Count ' Need to make this unique count
Cells(t, 9).Value = List
End If
Next t
End Sub

View Replies!   View Related
Cascading Combo Boxes - VBA Coding
I’ve created two combo boxes and what I seem to need are “cascading combo boxes”

I have named ranges on a worksheet called LookupLists
Column A has Areas
and Columns H to L has services within those areas.
Column headers, i.e. Row 1 of the columns, H to L are Serv1, Serv2 and so on.

Each area, in column A, has different services, in column H to L.

I have two combo boxes, what I’d like is depending on which Area is chosen in the first combo box, that the correct column is chosen which lists only those services available in that area; for example maybe Area A has services 2. Area B has services 4 …

… so in my “logical” mind if Combo box 1 I choose “Area B” then I want Combo box 2 to look at Column K and show the services from there..

View Replies!   View Related
FOR, IF, NEXT... Error In VBA While Attempting A Simple Code
Had a bit of code I was working on for a guy on here, and came across a problem while putting the finishing touches on it. It's since been solved by someone else, but for future reference...

View Replies!   View Related
Simple Multiply VBA Variable To Range
how do I multiply a variable to a range?

I've tried the following code but that does not work. My variable name is CurrRate

with range("D7:D207, G7:G207")
.value = .value * CurrRate
end with

View Replies!   View Related
How Can I Create A Pop Up User Fill In Form Using Vba Coding
Is it possible to use vba coding to create a pop up user form by clicking on a button in excel?

I want to create a pop up form that a user can fill out with fields for name and address information. Then click a button to save and close the form based on the last name field box.

View Replies!   View Related
Running Simple VBA Code Causing Screen Errors
I have a rather large workbook (30 sheets, 10MB) that has one worksheet with many INDIRECT functions in it (pulling data from the same file, different tabs). I am working to put simple code into the workbook to protect and/or unprotect all worksheets. I have gotten code to work to both protect and unprotect all the sheets, but when I run the unprotect code (see below), and then I go to edit the workbook, data from the sheet with many "indirect" functions temporarily "overwrites" the data on the active sheet (this is fixed when I scroll my mouse over the effected cells). I am developing this workbook for other users, so I'd like to fix this before sending it off to them.

This problem does not happen until after I run the following .....

View Replies!   View Related
Vba Coding... IF, Then, Goto "multi Workbooks"
i need help with this if statement.
i want excel to look at what text is in the combo box on my user form, depending on what it is i want it to move me to another workbook and a specific sheet within that workbook.

the code i have tried myself is...

View Replies!   View Related
Call Tracker - VBA Coding: Input Screen To Auto Clear The Fields Once The " Save " Button
1) We need the Input screen to auto clear the fields once the " Save " button has been pressed and data transfered to the appropriate tracking sheet

2) We want to ensure that if any of the Red cells are empty the " Save " button will give an error ( one complication If the "Transfer Type" highlighted in Blue has an entry " either STD/ISD/ESP " then " Call Purpose " needs to be mandatory

3) somehow the information on the "Comment " field is not getting captured

4) If possible we want a warning indicator if two rows in a tracking sheet ( example London ) are the same based on Coloums B to I ( except C )

5) Is there any possibility to give a pop calender in the " scheduled date " section of Input screen (Row 33)

View Replies!   View Related
VBA Coding For Data To Activate On Data Entry
I have a spreadsheet which when I enter data into cell E15 (this cell is dropdown list (AL,ML,SDY,Toil)) it will copy data from another part of the spreacheet and past as value only.

So the aim is to select e15 pick from the dropdown this activates my VBA that copies data from cell A" and pastes special in A3 will this work on a dropdown and if so what code do i use. If it wont work what can i do instead.

Example I have used;

Sub ch()
If Range("F15") = "AL" Then

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Case Else
Exit Sub
End Select
End Sub

View Replies!   View Related
Simple VBA "View Code"
Basically in my sheet I have a table of various data, where an entrant can appear more than once. e.g.


I want to make it so that if you type in an input cell (say cell G10) an entrant your interest in (i.e. A, B, C or D), then the corresponding entrants in the table will change font color to red and go bold.

I know this must be done by right clicking on the sheet and entering a code in "View code". I can't use conditional formatting because I've already used up all 3 conditions!

View Replies!   View Related
Countdown Clock
How to add a countdown timer with start, stop, reset functions to an existing Excel spreadsheet?

View Replies!   View Related
World Clock
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!)

View Replies!   View Related
Stop The Clock
Option Explicit
Private Sub UserForm_Initialize()
lblCloseProgress1.BackColor = &H8000000F
lblCloseProgress2.BackColor = &H8000000F
lblCloseProgress3.BackColor = &H8000000F
lblCloseProgress4.BackColor = &H8000000F
lblCloseProgress5.BackColor = &H8000000F
End Sub......................................

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.

View Replies!   View Related
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".

View Replies!   View Related
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.

View Replies!   View Related
Active Clock That Updates By The Minute
Is there anyway of getting an "Active Clock" in a cell.
I know the =now() thing, but this is not what I am looking for,
I would like to get a clock that updates by the minute, without having to select a cell, or make excel do a calculation.

View Replies!   View Related
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.

View Replies!   View Related
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.

View Replies!   View Related
Create The Clock In Worksheet Through Macro
I would like to create the clock function.

This is my function name. - Clock()

If i put this function in Cell A1. Then from now onwards cell A1 will display system current time. It will keep showing the every seconds changes.

And clock will run itself independenly.

View Replies!   View Related
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
A2(timeout1)=11:30 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

View Replies!   View Related
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.

View Replies!   View Related
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.

View Replies!   View Related
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.

View Replies!   View Related
Formula: Current Month Based On System Clock
Is There a formula for current Month based on system clock....

View Replies!   View Related
Coding Months
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"
2007 "4"
2008 "5"
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

View Replies!   View Related
Optimizing Coding
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....

View Replies!   View Related
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

Sample File


View Replies!   View Related
Simple Ledger
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.

View Replies!   View Related
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.

View Replies!   View Related
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:

T: 6/1/07
A: 6/8/07

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:

T: 6/4/07
RT: 6/15/07

View Replies!   View Related
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.

View Replies!   View Related
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.

View Replies!   View Related
Color Coding Formula
i'm trying to figure out a formula that if a cell is greater or equal to another cell - color a cell "GREEn"

otherwise...color the cell "red"

View Replies!   View Related
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.

View Replies!   View Related
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))

View Replies!   View Related
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.

View Replies!   View Related
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:

View Replies!   View Related
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.

View Replies!   View Related
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)

View Replies!   View Related
Simple Daily Interest
does anyone know how to calculate the interest so it matches this? .......

View Replies!   View Related
Copyright © 2005-08, All rights reserved