Thread: InsertFirst
View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.misc
kyoshirou kyoshirou is offline
external usenet poster
 
Posts: 133
Default InsertFirst

Do u mean Assign Macro?
From there, i can choose which macro to use?

"Dave Peterson" wrote:

I mean turn on the macro recorder and sort that worksheet.

Then stop the macro recorder.

Then look at the code that you generated.

kyoshirou wrote:

what do u mean?
(the new entry data still save inside the last row?)

What did you get when you recorded it when you did it manually?

kyoshirou wrote:

how should the macro goes?

"Dave Peterson" wrote:

Why not just put the new entry at the bottom and then sort the history sheet by
the date/time (column A).

Record a macro that sorts that worksheet, then add it to the bottom of the code
(or just run it when you need it sorted).

kyoshirou wrote:

Hello..

I have this code:
As new data is save at the last row, how do i make it to save on the first
row? Do i use FirstRow?

Any website to teach?

Thanks!

Set inputWks = Worksheets("MAIN")
Set historyWks = Worksheets("Data")

With historyWks
nextRow = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0).Row
End With

With inputWks
Set myRng = .Range(myCopy)

If Application.CountA(myRng) < myRng.Cells.Count Then
MsgBox "Please fill in all the cells!"
Exit Sub
End If
End With

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson