DATE ORDER

D

Dave

Hi, I have a spreadsheet in which I log events by date. Sometimes the last
event entered in the last row is not the most recent. Is the a way that excel
can move this row into date order?

Thanks
 
D

Dave

Hi Max

Of course this would be the simple solution however not practical for my
needs. I need the spreadsheet to automatically keep the rows in date order.
Any solution to this problem would be greatly appreciated.

Thanks
 
D

Dave

Thanks Dave

Thats a good idea. Im sure there is a way of making the macro run everytime
you open the sheet? Do you know how this is done?

Thanks
 
D

Dave Peterson

Open a workbook or activate a worksheet?

If you mean open a workbook, you can use the Auto_Open procedure in a General
module or you can use the Workbook_Open event in the ThisWorkbook module.

If you mean activate a sheet, you can use that sheet's worksheet_activate event
in that worksheet's module.
 
D

Dave

Hi Dave

How do you do this?

Thanks

Dave Peterson said:
Open a workbook or activate a worksheet?

If you mean open a workbook, you can use the Auto_Open procedure in a General
module or you can use the Workbook_Open event in the ThisWorkbook module.

If you mean activate a sheet, you can use that sheet's worksheet_activate event
in that worksheet's module.
 
D

Dave Peterson

In a General module:

Option Explicit
Sub Auto_Open()
msgbox "Hi from Auto_Open"
End Sub

In the ThisWorkbook module:
Option Explicit
Sub Workbook_Open()
msgbox "hi from workbook_open"
End Sub

In any worksheet module:
Option Explicit
Private Sub Worksheet_Activate()
MsgBox "Hi from worksheet_activate"
End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
Hi Dave

How do you do this?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top