Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken Vo
 
Posts: n/a
Default How to create command button to save the dates and time

Hi,

I wonder if anyone can help me. I need to know how to create a command
button, when clicked it saves the spreadsheet along with the dates and time
on my desktop.

However, if that can't be done...is there a formula that lets u saves the
spreadsheet along with the dates and time. Whenever I open the same spread
sheet, the dates gets changed and my previous information of the dates are
lost - I use [= NOW()]. How can i stop this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
paul
 
Posts: n/a
Default How to create command button to save the dates and time

copy and paste special =now() as a value or delete =Now() and
Insert a static date or time
Current date Select a cell and press CTRL+;

Current time Select a cell and press CTRL+SHIFT+;

Current date and time Select a cell and press CTRL+; then SPACE then
CTRL+SHIFT+;





--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Hi,

I wonder if anyone can help me. I need to know how to create a command
button, when clicked it saves the spreadsheet along with the dates and time
on my desktop.

However, if that can't be done...is there a formula that lets u saves the
spreadsheet along with the dates and time. Whenever I open the same spread
sheet, the dates gets changed and my previous information of the dates are
lost - I use [= NOW()]. How can i stop this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken Vo
 
Posts: n/a
Default How to create command button to save the dates and time

Thanks Paul,

What I really want is a formula in a command button to save the dates and
time that i have inspected a road. Whenever i open the same spread sheets,
the dates and time have changed. Can u help?

"paul" wrote:

copy and paste special =now() as a value or delete =Now() and
Insert a static date or time
Current date Select a cell and press CTRL+;

Current time Select a cell and press CTRL+SHIFT+;

Current date and time Select a cell and press CTRL+; then SPACE then
CTRL+SHIFT+;





--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Hi,

I wonder if anyone can help me. I need to know how to create a command
button, when clicked it saves the spreadsheet along with the dates and time
on my desktop.

However, if that can't be done...is there a formula that lets u saves the
spreadsheet along with the dates and time. Whenever I open the same spread
sheet, the dates gets changed and my previous information of the dates are
lost - I use [= NOW()]. How can i stop this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
paul
 
Posts: n/a
Default How to create command button to save the dates and time

a simple macro will do this automatically upon a click of a button otherwise
you are stuck with ctrl; ctrlshift;
--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Thanks Paul,

What I really want is a formula in a command button to save the dates and
time that i have inspected a road. Whenever i open the same spread sheets,
the dates and time have changed. Can u help?

"paul" wrote:

copy and paste special =now() as a value or delete =Now() and
Insert a static date or time
Current date Select a cell and press CTRL+;

Current time Select a cell and press CTRL+SHIFT+;

Current date and time Select a cell and press CTRL+; then SPACE then
CTRL+SHIFT+;





--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Hi,

I wonder if anyone can help me. I need to know how to create a command
button, when clicked it saves the spreadsheet along with the dates and time
on my desktop.

However, if that can't be done...is there a formula that lets u saves the
spreadsheet along with the dates and time. Whenever I open the same spread
sheet, the dates gets changed and my previous information of the dates are
lost - I use [= NOW()]. How can i stop this?

  #5   Report Post  
Posted to microsoft.public.excel.misc
Ken Vo
 
Posts: n/a
Default How to create command button to save the dates and time

How do you do a simple macro?

Can u create a command button and upon a click, it spits out a staic date
and time?
Please help. Thanks.


"paul" wrote:

a simple macro will do this automatically upon a click of a button otherwise
you are stuck with ctrl; ctrlshift;
--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Thanks Paul,

What I really want is a formula in a command button to save the dates and
time that i have inspected a road. Whenever i open the same spread sheets,
the dates and time have changed. Can u help?

"paul" wrote:

copy and paste special =now() as a value or delete =Now() and
Insert a static date or time
Current date Select a cell and press CTRL+;

Current time Select a cell and press CTRL+SHIFT+;

Current date and time Select a cell and press CTRL+; then SPACE then
CTRL+SHIFT+;





--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Hi,

I wonder if anyone can help me. I need to know how to create a command
button, when clicked it saves the spreadsheet along with the dates and time
on my desktop.

However, if that can't be done...is there a formula that lets u saves the
spreadsheet along with the dates and time. Whenever I open the same spread
sheet, the dates gets changed and my previous information of the dates are
lost - I use [= NOW()]. How can i stop this?



  #6   Report Post  
Posted to microsoft.public.excel.misc
Ken Vo
 
Posts: n/a
Default How to create command button to save the dates and time

I've gone through this website http://www.mcgimpsey.com/excel/timestamp.html.
I dont know how to use the code given:

Public Sub DateTimeStamp(ByVal ChangedCells As Range, _
Optional ByVal IncludeDate As Boolean = True, _
Optional ByVal IncludeTime As Boolean = True, _
Optional ByVal DTFormat As String = "dd mmm yyyy hh:mm", _
Optional ByVal RowOffset As Long = 0&, _
Optional ByVal ColOffset As Long = 1&, _
Optional ByVal ClearWhenEmpty As Boolean = True)
Const n1904 As Long = 1462
Dim bClear As Boolean
Dim rArea As Range
Dim rCell As Range

Application.EnableEvents = False
For Each rArea In ChangedCells.Areas
For Each rCell In rArea
With rCell
bClear = ClearWhenEmpty And IsEmpty(.Value)
With .Offset(RowOffset, ColOffset)
If bClear Then
.ClearContents
Else
.NumberFormat = DTFormat
.Value = Date * -IncludeDate - _
Time * IncludeTime + _
n1904 * .Parent.Parent.Date1904
End If
End With
End With
Next rCell
Next rArea
Application.EnableEvents = True
End Sub


"paul" wrote:

a simple macro will do this automatically upon a click of a button otherwise
you are stuck with ctrl; ctrlshift;
--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Thanks Paul,

What I really want is a formula in a command button to save the dates and
time that i have inspected a road. Whenever i open the same spread sheets,
the dates and time have changed. Can u help?

"paul" wrote:

copy and paste special =now() as a value or delete =Now() and
Insert a static date or time
Current date Select a cell and press CTRL+;

Current time Select a cell and press CTRL+SHIFT+;

Current date and time Select a cell and press CTRL+; then SPACE then
CTRL+SHIFT+;





--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Hi,

I wonder if anyone can help me. I need to know how to create a command
button, when clicked it saves the spreadsheet along with the dates and time
on my desktop.

However, if that can't be done...is there a formula that lets u saves the
spreadsheet along with the dates and time. Whenever I open the same spread
sheet, the dates gets changed and my previous information of the dates are
lost - I use [= NOW()]. How can i stop this?

  #7   Report Post  
Posted to microsoft.public.excel.misc
Peo Sjoblom
 
Posts: n/a
Default How to create command button to save the dates and time

http://www.mvps.org/dmcritchie/excel/install.htm

--
Regards,

Peo Sjoblom

(No private emails please)


"Ken Vo" wrote in message
...
I've gone through this website
http://www.mcgimpsey.com/excel/timestamp.html.
I dont know how to use the code given:

Public Sub DateTimeStamp(ByVal ChangedCells As Range, _
Optional ByVal IncludeDate As Boolean = True, _
Optional ByVal IncludeTime As Boolean = True, _
Optional ByVal DTFormat As String = "dd mmm yyyy hh:mm", _
Optional ByVal RowOffset As Long = 0&, _
Optional ByVal ColOffset As Long = 1&, _
Optional ByVal ClearWhenEmpty As Boolean = True)
Const n1904 As Long = 1462
Dim bClear As Boolean
Dim rArea As Range
Dim rCell As Range

Application.EnableEvents = False
For Each rArea In ChangedCells.Areas
For Each rCell In rArea
With rCell
bClear = ClearWhenEmpty And IsEmpty(.Value)
With .Offset(RowOffset, ColOffset)
If bClear Then
.ClearContents
Else
.NumberFormat = DTFormat
.Value = Date * -IncludeDate - _
Time * IncludeTime + _
n1904 * .Parent.Parent.Date1904
End If
End With
End With
Next rCell
Next rArea
Application.EnableEvents = True
End Sub


"paul" wrote:

a simple macro will do this automatically upon a click of a button
otherwise
you are stuck with ctrl; ctrlshift;
--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Thanks Paul,

What I really want is a formula in a command button to save the dates
and
time that i have inspected a road. Whenever i open the same spread
sheets,
the dates and time have changed. Can u help?

"paul" wrote:

copy and paste special =now() as a value or delete =Now() and
Insert a static date or time
Current date Select a cell and press CTRL+;

Current time Select a cell and press CTRL+SHIFT+;

Current date and time Select a cell and press CTRL+; then SPACE
then
CTRL+SHIFT+;





--
paul
remove nospam for email addy!



"Ken Vo" wrote:

Hi,

I wonder if anyone can help me. I need to know how to create a
command
button, when clicked it saves the spreadsheet along with the dates
and time
on my desktop.

However, if that can't be done...is there a formula that lets u
saves the
spreadsheet along with the dates and time. Whenever I open the same
spread
sheet, the dates gets changed and my previous information of the
dates are
lost - I use [= NOW()]. How can i stop this?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to calulate time in hours cbetween two different dates? shonkoo Excel Worksheet Functions 3 October 30th 05 04:30 AM
How do I create conditional formatting to track due dates Soraiya Excel Worksheet Functions 2 October 14th 05 03:26 PM
How do you create or set up time lines Ralph Nagle Charts and Charting in Excel 2 July 24th 05 04:23 PM
How do I create a drop down cell with dates Jagz Excel Discussion (Misc queries) 3 April 24th 05 08:43 PM
How to calculate time between two dates? ByGolly! Setting up and Configuration of Excel 1 February 12th 05 04:42 PM


All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"