|
-
Jun 23rd, 2005, 08:25 PM
#1
Thread Starter
Member
List Box
Hello,
I have a list box which references 6 columns from a sheet. The first row in the list is the heading of the list. Is there anyway to set this row so that is the heading in the list box and does not move when the uses scrolls up and down the list.
Please Help
-
Jun 23rd, 2005, 10:17 PM
#2
Re: List Box
If this is in an Access form then I do not believe there is. You could do a workaround by creating a label and placing it above the
listbox as a column header so to speak.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 23rd, 2005, 10:40 PM
#3
Re: List Box
i was lokin at it in excel, the help indicates it can use the first row of data
from help file
Remarks
When the system uses the first row of data items as column headings, they can't be selected.
but i didn't find anyway to do
pete
-
Jun 23rd, 2005, 10:51 PM
#4
Re: List Box
Instead of a Listbox, since you have 6 columns of data, how about using a listview control? It will keep its column headers fixed as
you scroll down through the data.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 27th, 2005, 10:44 PM
#5
Thread Starter
Member
Re: List Box
 Originally Posted by RobDog888
Instead of a Listbox, since you have 6 columns of data, how about using a listview control? It will keep its column headers fixed as
you scroll down through the data.
RobDogg888 how do i use one of those, is it an extra control that i have to add to the tool box.
Thanks for you help
-
Jun 27th, 2005, 11:06 PM
#6
Re: List Box
Click on More Controls... > Microsoft ListView Control 6.0 (SP4) and add it to your sheet or userform.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 28th, 2005, 06:19 AM
#7
Re: List Box
Robdogg:
In Access, properties sheet, Format there is a 'Column Heads' Option which uses the first row as a title bar.
Same in Excel... Or should be.
Just tested and it is there.. however, always a catch, it changed the top row of an empty list box into the header, but filled below it with the data.
I posted a fill list box from spreadsheet a while back (week or so). You may be able to tweak that to edit the first (header) row. Have a look in the help files/msdn?
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
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
|