|
-
June 5th, 2000, 02:52 PM
#1
saving listitems after sorting...
I want to save the listview items before closing. When I sort a column and close the listview, the sort order must be saved. How is this possible?
thanks
-
June 5th, 2000, 04:39 PM
#2
Re: saving listitems after sorting...
Sounds like a registry entry to me. You could use code similiar to the following to set this value:
Sub SaveLVSettings()
If SaveSetting(app.exename,me.name,"ListViewSortStyle",ListView1.SortKey) then
'it saved - do nothing
else
msgbox "Settings could not be saved.",vbinformation
End if
End Sub
then when the form opens up, you can read that value back in :
private Sub Form_Load()
ListView1.SortKey = CInt(GetSettings(app.exename,me.name,"ListViewSortStyle","0"))
End Sub
this will place a registry setting in the CurrentUser\Software\VB and VBA Program Settings\(Your AppName) hive.
hope this helps,
John
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|