Hey Guys,
After the last thread in which rows conditionally had to be copied out of a database into tabs, which succeeded thanks to the help on the forum, I want the database to be better organised. I'm looking for a macro which will automatically order the rows in the database according to the date of offer. Now reapply has to be used and I will think the people who will use this model will forget this.
I have not got any knowledge about macro's and when searching I found this one:
Private Sub Database(ByVal Sh As Object, ByVal Target As Range)
If Intersect(Sh.Range("B2:B100"), Target) Is Nothing Then Exit Sub
If Sh.FilterMode = True Then
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
With ActiveWorkbook
.CustomViews.Add ViewName:="Mine", RowColSettings:=True
Sh.AutoFilterMode = False
.CustomViews("Mine").Show
.CustomViews("Mine").Delete
End With
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End If
End Sub
So the database-order needs to be adjusted dependent of the data in column B. The code was intered in the 'view code' screen of the database tab. I hope I made my question clear and you can help me with this one.
Looking forward to an answer,
Floris
Bookmarks