PDA

View Full Version : [SOLVED] Registration/ Clocking system



rav_x06
10-26-2007, 02:53 PM
Hi, i have a spreadsheet this I justed added a clock which autoupdates with a timer, now i have a register where people can sign in so when this button is click the date is automatically entered in a sheet:


Sheets("Register").Select
Range("A4").Select
ActiveCell.FormulaR1C1 = "=TODAY()"

that is hidden and then the time is captured from the clock that is on another sheet, but the problem is that the next time the people signs in the a4 cell is overwritten so basically need something that will select the cell down and write the date there. and another problem is that when the time is enter it continue to change becuase the link is to the clock that autoupdates. Hope this is understandable, otherwise i can send da file for a better understanding.

lucas
10-26-2007, 02:57 PM
It would help if you could post the file...click on post reply at the bottom left of the last post and after typing your message scroll down till you find "manage attachments" if it's too big...zip it.

rav_x06
10-26-2007, 03:08 PM
Hi, im learning visual basic so just be help.lol


Thanks

lucas
10-26-2007, 03:19 PM
Well there is a lot of code and I don't know where to find this code:

Sheets("Register").Select
Range("A4").Select
ActiveCell.FormulaR1C1 = "=TODAY()"


I would suggest that you add sheet change code to the register sheet ....something like this which will remove all the formula from the sheet and replace with the values that show at that time.

With Cells
.Select
.Copy
Selection.PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
End With
ps thanks for admitting this is school work....we will not solve your problem for you (forum policy) but we will be glad to help with specific questions to help you work out your project....

rav_x06
10-26-2007, 03:35 PM
Well there is a lot of code and I don't know where to find this code:

Sheets("Register").Select
Range("A4").Select
ActiveCell.FormulaR1C1 = "=TODAY()"

I would suggest that you add sheet change code to the register sheet ....something like this which will remove all the formula from the sheet and replace with the values that show at that time.

With Cells
.Select
.Copy
Selection.PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
End With ps thanks for admitting this is school work....we will not solve your problem for you (forum policy) but we will be glad to help with specific questions to help you work out your project....


Hi that code is in userform5 and under the sign in button, but need it to remain the date and time for tracking purposes and basically say monday the person signs in and the date and time is record in date :A4 and time :c4, so after on tuesday the person sign in again but this time the date is recorded on B4 and the time on B4 therefore the information for monday is saved.

rav_x06
10-27-2007, 07:55 AM
Hi, I have a spreadsheet with button and on a macro that inputs the =now() on another sheet, so the cell in that sheet is entered with cell and than the cell pointer moves down so the next time the = now() is entered in the cell below the presvious one.



Sheets("Register").Select
Range("C6").Select
Do Until ActiveCell.Text = ""
ActiveCell.Offset(1, 0).Select
Loop

so the pointer moves down until a free cell is found but the problem is that when after =now() is entered the date above that cell is updated to the 1 in the new cell.

e.g.

on Monday 1 oct a person signed in at 1.00pm and this information is in C6
and the after on tuesday the sameperson signs in again so the information goes in c7, = tuesday 2 oct and 2.00 but the information on c6 changes to the information on c7.

Thanks

Norie
10-27-2007, 08:10 AM
There's nothing in that code that puts a date/time anywhere.:bug:

rav_x06
10-27-2007, 08:14 AM
There's nothing in that code that puts a date/time anywhere.:bug:

Hi, sorry that wasnt the full code only da move down section:


If TextBox1.Text = "0789" And TextBox2.Text = "password1" Then
Sheet4.Visible = xlSheetVisible
Sheets("Register").Select
Range("A5").Select
ActiveCell.End(xlDown).Select
Do Until ActiveCell.Text = ""
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.FormulaR1C1 = "=now()"
Sheet4.Visible = xlSheetVeryHidden
Sheets("Interface").Select
End
End If

Norie
10-27-2007, 08:19 AM
Why use a formula?

Why not use the VBA function Now?


ActiveCell = Now

By the way there are easier ways to find the next blank cell.


With Sheets("Register")
NextRow = .Range("A" & Rows.Count).End(xlUp).Row
.Range("A" & NextRow) = Now
End With

lucas
10-27-2007, 08:30 AM
Threads merged:

To all who read this thread be aware that this is coursework. Rav stated this early in the first thread and has edited it out for some reason.
rav,
Please do not start new threads asking the same question. It only confuses folks who are trying to help you.

rav, if you want help you will have to abide by the forum rules or your thread will be locked or you will be banned. If you disregard courtious links to faqs, requests and directions about board policy you must know that will happen.

rav_x06
10-27-2007, 08:35 AM
Threads merged:

To all who read this thread be aware that this is coursework. Rav stated this early in the first thread and has edited it out for some reason.
rav,
Please do not start new threads asking the same question. It only confuses folks who are trying to help you.

rav, if you want help you will have to abide by the forum rules or your thread will be locked or you will be banned. If you disregard courtious links to faqs, requests and directions about board policy you must know that will happen.

yes but can i ask question im doing the work by myself, its as you said i can ask questions. you see this is researching im not doing anything wrong.

Thanks

lucas
10-27-2007, 08:49 AM
Yes you can ask questions but don't be misleading.

You started a thread and stated that you were a student
I told you what our policy is on homework and you edited your thread so that others who read the thread might not know that you are a student

You posted an example file and then removed it???
Both of your actions above happened in post#3 which shows that you edited the post...you don't even have to be a mod to know that it was edited.

You started a new thread asking the same question with no reference to the coursework...

If others here find you to be deceptive and/or misleading they will not be inclined to help you. Also starting multiple threads asking the same question is not just discourtious...it is annoying and will result in same. Please read our faq. We are all volunteers, we do not get paid so it is up to you to be courtious and respectful.

Norie
10-27-2007, 08:51 AM
rav

I don't think Steve is saying you are doing anything particulary wrong.

It's just that you should try and stick to the forum rules.

If you don't you might find yourself not getting any help at all.

I responded to this thread thinking it was new, but it turns out it's not.

And you've already been given some suggestions in the other thread.

lucas
10-27-2007, 08:53 AM
Norie is correct...if I thought you were doing anything seriously wrong we wouldn't be having this exchange....just try to understand how things work here and you will stand a much better chance of getting help..that's all I'm saying.

rav_x06
10-27-2007, 09:01 AM
hi, ok fair enough if the forum rules are these that its ok. but i was speaking from a examination point as in this is research which is allowed by exam boards, but it ok. sorry 4 any problems

Thanks anyways

lucas
10-27-2007, 09:11 AM
rav, You can always post followup questions in this thread.