Naked Science Forum
Non Life Sciences => Geek Speak => Topic started by: ukmicky on 23/04/2008 01:25:29
-
Please please please I'm hooked on and trying to teach myself excel and need help doing something .
I can change the date automtically in excel by typing in =today() in cell B2
However i would be prefer to change the date in B2 by creating a text box/ button so it updates only when i click on the button.
Howwwwwwww
-
If I remember correctly, you can do it using events and form controls. I don't use Excel any more (OpenOffice rules!), but I'm sure that's how it's done. Check out macros, events, triggers and form controls in the help system.
-
You need to write a small macro:
Sub UpDateDate()
'
' UpDateDate
' made by MonikaS
'
D = CDate(FormatDateTime(Now, vbShortDate))
Range("B5").Value = D
End Sub
Attach this to a graphic on your spreedsheet and each time you click the graphic the date will change to the current date in cell B5.
HTH
Monika
-
You need to write a small macro:
Sub UpDateDate()
'
' UpDateDate
' made by MonikaS
'
D = CDate(FormatDateTime(Now, vbShortDate))
Range("B5").Value = D
End Sub
Attach this to a graphic on your spreedsheet and each time you click the graphic the date will change to the current date in cell B5.
HTH
Monika
Thankyou i will try it
-
You need to write a small macro:
Sub UpDateDate()
'
' UpDateDate
' made by MonikaS
'
D = CDate(FormatDateTime(Now, vbShortDate))
Range("B5").Value = D
End Sub
Attach this to a graphic on your spreedsheet and each time you click the graphic the date will change to the current date in cell B5.
HTH
Monika
Yeah, you can do it that way if you really must [:P]
-
Well, he wanted a button to click on [;D]
Without a button Crtl . (it's a dot) would insert the current date using the default datetime format.
Monika
-
Well, he wanted a button to click on [;D]
Without a button Crtl . (it's a dot) would insert the current date using the default datetime format.
Monika
Button, Schmutton... oy vay!
-
Thankyou MonikaS
It works brilliantly ,now i can click on a transparent box and it changes the date underneath [8D]
Dont worry doc i know you would have figured it out for me sooner or later [::)]
-
Dont worry doc i know you would have figured it out for me sooner or later [::)]
I doubt it as I don't use Excel. I switched to OpenOffice a couple of years ago. I don't even have Excel on my PCs anymore.
I was sent an Excel spreadsheet a few days ago - 42k in size. I loaded it into OpenCalc and saved it in .ods format - 17k. That's 1 of the reasons I don't use Excel.