Macro

M

Michael

Need a macro that will simply copy whatever I put in the active cell into the
next column over one row down for 20+ rows. Made an Excel Macro similar to
what I would like. Don't know if adaptation is a pain.

Thanks.

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 3/6/2005 by Michael
'
' Keyboard Shortcut: Ctrl+z
ActiveCell.Copy
Dim MyArray(1 To 20) As Variant
For i = 1 To 20
X = MyArray(i)
ActiveCell.Offset(1, X).Select
ActiveSheet.Paste
Next i
End Sub
 
J

Jan De Messemaeker

Hi Michael,

I wouldn't try to adapt this.
In project a cell does not even have the value property.
You have to know what kind of field it is before you can enter data in it.

You could use the following methods:

Selectcellright
Selectcelldown
Activecell.fieldid
activeselection.tasks (if your view is a task view), else
activeselection.resources

Combining these will no doubt allow to do what you want

HTH
 
Top