ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Macro Problem (https://www.excelbanter.com/new-users-excel/260079-macro-problem.html)

DiscipleTom

Macro Problem
 
I'm created a simple macro to enter the current date and time =NOW(). That
works with the macro...however, I can't get it to stop moving over to the
next column and
returning to the top of that column. I've tried recording =NOW() ENTER;
=NOW() TAB; =NOW() RIGHT ARROW. all seem determined to move to the next
column top. What am I missing?

FSt1

Macro Problem
 
hi
we are not going to know until you post your code that is doing it.

regards
FSt1

"DiscipleTom" wrote:

I'm created a simple macro to enter the current date and time =NOW(). That
works with the macro...however, I can't get it to stop moving over to the
next column and
returning to the top of that column. I've tried recording =NOW() ENTER;
=NOW() TAB; =NOW() RIGHT ARROW. all seem determined to move to the next
column top. What am I missing?


DiscipleTom

Macro Problem
 
OK...Here it is:

Sub DateTime()
'
' DateTime Macro
' Enter Date and Time
'
' Keyboard Shortcut: Ctrl+d
'
ActiveCell.FormulaR1C1 = "=NOW()"
Range("A3").Select
End Sub

The A3 Cell is where the cursor ends up...At the end of entering the macro,
the "stop macro" button is grayed out and I have to press enter to get it
back.

the desired result is to enter the date and time and then move to the cell
on the right to continue entering data.

Thanks for helping.

"FSt1" wrote:

hi
we are not going to know until you post your code that is doing it.

regards
FSt1

"DiscipleTom" wrote:

I'm created a simple macro to enter the current date and time =NOW(). That
works with the macro...however, I can't get it to stop moving over to the
next column and
returning to the top of that column. I've tried recording =NOW() ENTER;
=NOW() TAB; =NOW() RIGHT ARROW. all seem determined to move to the next
column top. What am I missing?


Roger Govier[_8_]

Macro Problem
 
Hi

Sub DateTime()
'
' DateTime Macro
' Enter Date and Time
'
' Keyboard Shortcut: Ctrl+d
'
ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Offset(0,1).Select

End Sub
--
Regards
Roger Govier

DiscipleTom wrote:
OK...Here it is:

Sub DateTime()
'
' DateTime Macro
' Enter Date and Time
'
' Keyboard Shortcut: Ctrl+d
'
ActiveCell.FormulaR1C1 = "=NOW()"
Range("A3").Select
End Sub

The A3 Cell is where the cursor ends up...At the end of entering the macro,
the "stop macro" button is grayed out and I have to press enter to get it
back.

the desired result is to enter the date and time and then move to the cell
on the right to continue entering data.

Thanks for helping.

"FSt1" wrote:

hi
we are not going to know until you post your code that is doing it.

regards
FSt1

"DiscipleTom" wrote:

I'm created a simple macro to enter the current date and time =NOW(). That
works with the macro...however, I can't get it to stop moving over to the
next column and
returning to the top of that column. I've tried recording =NOW() ENTER;
=NOW() TAB; =NOW() RIGHT ARROW. all seem determined to move to the next
column top. What am I missing?


Don Guillett[_2_]

Macro Problem
 
Sub enterdateandmovetoright()
With ActiveCell
..Value = Now
..Offset(, 1).Select
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DiscipleTom" wrote in message
...
OK...Here it is:

Sub DateTime()
'
' DateTime Macro
' Enter Date and Time
'
' Keyboard Shortcut: Ctrl+d
'
ActiveCell.FormulaR1C1 = "=NOW()"
Range("A3").Select
End Sub

The A3 Cell is where the cursor ends up...At the end of entering the
macro,
the "stop macro" button is grayed out and I have to press enter to get it
back.

the desired result is to enter the date and time and then move to the cell
on the right to continue entering data.

Thanks for helping.

"FSt1" wrote:

hi
we are not going to know until you post your code that is doing it.

regards
FSt1

"DiscipleTom" wrote:

I'm created a simple macro to enter the current date and time =NOW().
That
works with the macro...however, I can't get it to stop moving over to
the
next column and
returning to the top of that column. I've tried recording =NOW() ENTER;
=NOW() TAB; =NOW() RIGHT ARROW. all seem determined to move to the
next
column top. What am I missing?




All times are GMT +1. The time now is 05:21 AM.

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