ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   autotab (https://www.excelbanter.com/excel-discussion-misc-queries/165975-autotab.html)

mats

autotab
 
Hi,
I made a "short" macro with a button that is going to enter the time of
day....but would also like to "autotab to next cell" for the next time stamp.
How do I fix that? See code below.

Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
End Sub


Regards Mats

Gary''s Student

autotab
 
Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
ActiveCell.Offset(0, 1).Select
End Sub


--
Gary''s Student - gsnu200755


"Mats" wrote:

Hi,
I made a "short" macro with a button that is going to enter the time of
day....but would also like to "autotab to next cell" for the next time stamp.
How do I fix that? See code below.

Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
End Sub


Regards Mats


Mike H

autotab
 
Hi,

The answer to that depends on where the 'next' cell is and you don't tell
us.This enters your timestamp and moves 1 cell to the right:-

Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
ActiveCell.Offset(0, 1).Select
End Sub

Mike

"Mats" wrote:

Hi,
I made a "short" macro with a button that is going to enter the time of
day....but would also like to "autotab to next cell" for the next time stamp.
How do I fix that? See code below.

Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
End Sub


Regards Mats


mats

autotab
 
Tanks!

"Mike H" wrote:

Hi,

The answer to that depends on where the 'next' cell is and you don't tell
us.This enters your timestamp and moves 1 cell to the right:-

Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
ActiveCell.Offset(0, 1).Select
End Sub

Mike

"Mats" wrote:

Hi,
I made a "short" macro with a button that is going to enter the time of
day....but would also like to "autotab to next cell" for the next time stamp.
How do I fix that? See code below.

Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
End Sub


Regards Mats


mats

autotab
 
thanks!

"Gary''s Student" wrote:

Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
ActiveCell.Offset(0, 1).Select
End Sub


--
Gary''s Student - gsnu200755


"Mats" wrote:

Hi,
I made a "short" macro with a button that is going to enter the time of
day....but would also like to "autotab to next cell" for the next time stamp.
How do I fix that? See code below.

Sub TimeStamp()
ActiveCell.Value = Format(Time, "h:m ampm")
End Sub


Regards Mats



All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com