Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cursor keys in a macro

I recorded a macro and modified it and part of it works great, al
except for the last step. Here is what I'm trying to do.

I need to put the current time in a cell and a little while later pu
the time in the cell to the right. Kind of like a timer.

I recorded a macro that put the function Now() in the cell, then
copy to clipboard, then paste special (values) back in the same cell.
this puts the time back in the cell where its won't recalculate as th
function NOW(). I modified the macro to use the Active.cell whe
pasting so it won't jump to the cell I recorded macro with. that par
works great.

The problem is with the last step... After I paste the first time int
the cell, I want to move one cell to the right. the recorded macr
puts in the cell I use during recording... I need that to be relative
I need to modify to just cursor

I think I need the macro command to cursor once to the right.

the current macro is...

'

'
ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False
End Sub

What do I add to just move to the right one column?

Thanks
Mar

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 538
Default cursor keys in a macro

On Thu, 13 May 2004 17:57:28 -0500, mark hansen
wrote:

I recorded a macro and modified it and part of it works great, all
except for the last step. Here is what I'm trying to do.

I need to put the current time in a cell and a little while later put
the time in the cell to the right. Kind of like a timer.

I recorded a macro that put the function Now() in the cell, then I
copy to clipboard, then paste special (values) back in the same cell.
this puts the time back in the cell where its won't recalculate as the
function NOW(). I modified the macro to use the Active.cell when
pasting so it won't jump to the cell I recorded macro with. that part
works great.

The problem is with the last step... After I paste the first time into
the cell, I want to move one cell to the right. the recorded macro
puts in the cell I use during recording... I need that to be relative.
I need to modify to just cursor

I think I need the macro command to cursor once to the right.

the current macro is...

'

'
ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False


This is crap. Replace all of the above code with this line:
ActiveCell.Formula = Time

End Sub

What do I add to just move to the right one column?


This moves 0 cells down and 1 cell to the right.
ActiveCell.Offset(0,1).Select
--
auric underscore underscore at hotmail dot com
*****
Face down, arms out
Nailed to the cross of doubt
Blood runs like rain
Drowning for this world in vain
Crown of black thorns
Human skin, ripped and torn
Where is your savior now?
Where is your savior now?
-- Fear Factory, "****christ"
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cursor keys in a macro

Thanks for your help and quick responce... I appreciate it...

The original macro was recorded... That why all the extra stuff.
thanks for help with that too

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default cursor keys in a macro

Activecell.Value=Now
Activecell.Offset(0,1).Select

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub

What do I add to just move to the right one column?

Thanks
Mark


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cursor keys in a macro

Thanks for the help... boy, it sure can get alot cleaner..

--
Message posted from http://www.ExcelForum.com

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
Arrow keys won't move cursor Walterius Excel Discussion (Misc queries) 3 May 18th 23 07:43 PM
Cursor Movement with Arrow Keys Silver Excel Discussion (Misc queries) 1 March 23rd 10 11:31 PM
Cursor keys moving page??? Chip Pearson Excel Discussion (Misc queries) 0 August 8th 05 11:02 PM
Cursor keys moving page??? Chip Pearson Setting up and Configuration of Excel 0 August 8th 05 11:02 PM
cursor disappears using arrow keys mcardon Excel Discussion (Misc queries) 3 April 7th 05 12:40 AM


All times are GMT +1. The time now is 11:12 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"