Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Listbox Headers


Hello,

I'm using some listboxes in a vba script. I want to give names to the collumnheads. I can't find how to do that?

Thanx in advance,

Werner




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Listbox Column Headers Name
Hi,

I have a userform in Excel VBA which is connected to Access database.
there is a listbox in that userform and through SQL query I take the data from access table and add it to the listbox.
I know how to make it multi column listbox,currently I am using columncount property as 5 so there are 5 column.

the problem is that I don't know how to name the headers.
I know to use rowsource but I only can use it when data is from excel sheet. but in my case I need to get the data from access table.
can somebody please help how to get the headers name

Thanks

Column Headers In Listbox
Hello People,

I have a listbox on a form which is called by the following:


VB Code:
Call Pg1aList(reclist)


Where reclist is the name of my Listbox and Pg1aList is this function:


VB Code:
Public Function Pg1aList(lstholder As ListBox)        On Error GoTo ErrHandler    Dim pg5 As ADODB.Recordset    'Dim strText1 As String     Set pg5 = MyConn.Execute("SELECT RecID, indname, datedeveloped FROM apprecords")    lstholder.Clear  With pg5    Do Until .EOF        lstholder.AddItem (pg5("indname"))        lstholder.ItemData(lstholder.NewIndex) = pg5("RecID")        .MoveNext    LoopEnd With      Exit Function    'error handlerErrHandler:    MsgBox Err.Description        pg5.Close    Set pg5 = Nothing    End Function


This works fine, but I would like to have the two column names that I am using brought into the top of the Listbox as well. I basically want Name and Date to appear at the top of the Listbox, and then all the necessary records.

Any ideas on how I do this...??

Any help would be appreciated,

Al...

ListBox Column Headers
I know how to add columns headers (Icons and text) but, how can I add data under them. I use this:


Code:
with listbox1
.listitems.add , , "This is an Item", 1, 2
.listitems.add , , "This is another Item", 1, 2
end with


to add items to my listbox. Now, these go under the first column header, how can I make the code so there is some under the second and the third column header.

Thanks!

Listbox With Headers Inside
I have a listbox that pulls columns in from a database. All of the fields in the listbox are just thrown in. I would like a way to organize the fields by displaying a non-selecting header about a group of fields.
ie:
Transportation:
-AM Bus
-PM Bus

Student:
-Name
-Age
-Address

Being able to select AM Bus, PM Bus, Name, Age, Address. Not the headers Transportation and Student.

Any help is much appreciated.

Filling The Headers Of A Listbox
I have a listbox, which I gave 6 columns.
I set the ColumnHeaders property to true.
How do I fill the headers row?

Multi-Column ListBox Headers
Hiya.

I'm attempting to display a list of stuff using a multi column listbox on a UserForm.

I want each column to have a header, but **** man, I can't get them to display.

I can only find examples on the Internat where the RowSource property is pointed to a table of cells on a worksheet.

I want to set the column headers from within VBA.

Possible???

How Do You Show Listbox Column Headers???
Hi everyone, I hope this is simple...

I have a listbox created from a file, which scrolls both vertically and horizontally.

I want to protect my column headers from being deleted, and set column headers to true in the properties, however, nothn happens, I get a blank column at top of listbox. I obviously need to something else here, but what is is it??? I am puzzled!

Headers
I am trying to create a report in word through VB6. I don't have any experience with the word object model, but I have experience with Visual Basic. All I have for reference is Microsoft Word Visual Basic Reference and the Internet and I can't seem to find what I'm looking for. I need to put two different Headers in my document. My report has a cover page that will be on page 1 and it needs a header. For page 2 to n I need to put a different Header then the cover page. I have two Sections in the document. Section 1 is the cover page and Section 2 is for the rest of the report. I tried to use
for the cover page.
ActiveDocument.PageSetup.DifferentFirstPageHeaderFooter = True
ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage).Range.Inse rtAfter ("Cover Page Test" & vbCrLf)

then for the rest of the report
ActiveDocument.Sections(2).Headers(wdHeaderFooterPrimary).Range.Insert After ("Report Test")

but that doesn't seem to work at all.

Any Help would be appreciated

Headers
I have a function that invokes a word document to be created. I am using bookmarks to insert data into the word document which is never visible to the user just sent to the printer.

I put a bookmark in the header section but it is unrecognized? The number of pages is determined by the amount of text the user has entered on the form.

Anyway does anyone know how to add a header to the document? (I do want the same header for each page only I want to put the page number on it too.)

WMA Headers
Does any one know how to read WMA Headers?
I mainly need to get the song duration but other info would be handy too

CVS Headers
I'm using the code below to extract files from a database and place into a delimited text file. I need to also place the column header into the text file also. Can anyone show me how I can do this. Thank you.

visual basic code:Private Sub mnuFileExport_Click()
Dim fName As String, fNum As Integer
Dim db As ADODB.Connection
Dim objRS As New ADODB.Recordset

Screen.MousePointer = vbHourglass

Set objRS = New ADODB.Recordset

Call objRS.Open("SELECT Guest_ID, Name, Date, address, nok, nok_phone, " & _
"nok_address, ssn, dob, medication, vet, married, religeon, occupation, " & _
"income, race, education infoCollect, refered_by from guest;", _
DBConn, adOpenKeyset, adLockReadOnly)

fName = App.Path & "Security.cvs"
fNum = FreeFile

Open fName For Output As fNum
Do Until objRS.EOF = True
Write #fNum, objRS.GetString(adClipString, 1, ",", , vbCrLf)
Loop

objRS.Close
Close #fNum

Screen.MousePointer = vbDefault

MsgBox "The text file has been created.", vbInformation
End Sub

VB Cgi Headers
Hello,

Could anyone please tell me some headers for a VB CGI application to return, so i dont get this:


Code:
<h1>CGI Error</h1>The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:


or to something about it,

Thanks for your help,

Gif Headers
I am trying to find information on gif files, how they are constructed, how the header is used etc. If any one knows anything about this, or if you know where to find it please post a message.

Thank you,
Jeremy

Headers
I currently have a list that prints out in the following format

John Doe 123-45-6789
Sam Smith 111-11-1111

What I need to have happen is a header or something like that to appear above the first name as an Identifier for information in the column below. Also would need it to appear on subsequent pages

NAME SSN
John Doe 123-45-6789
Sam Smith 111-11-1111

What would the code be to accomplish this?

Thanks for the help

Reading .LIT Headers
I'm looking for a way to read the Title and Author Headers in .LIT files.

Is there a way to do this?

Thanks,
Dougster.

HTTP Headers
Hi, Im working on a File Server and am currently on the "file resume" feature. I have looked at the w3 memorandum, and saw several things on Accept-Ranges and range requests. My problem is that Internet Explorer isn't sending the range. How can I tell IE that my server is compatable with ranges..I tried sending this to IE
"Accept-Ranges: bytes" & vbcrlf
and that did not prompt IE to send the range. Am I missing something, or am I the first to deal with http headers? lol, axf

Ms Word Headers && VB
Hello Folks,

I am writing an App that takes in a document with a header and then asks you for another list of documents and the header from the first will be put into the second lot of documents.

the header form the first doc is in a table and when I try to take in the table and then insert it into the new documents, it puts it in without a table, so for each cell with info in it it is basically a new line in the new documents and takes up half the page.
Anyone have any ideas how I can pull the header from the original document keeping table intact and then inserting it into these new documents.

thanks for any help.

BarryK

VB6 Grid - Headers
Hey
I have a form in VB6 that is taking data from Oracle table and shows it in Grid
The column headers in grid show as they are on the table, what should I do ro show them differently in the grid ?

thank you

VBA Row And Colum Headers
Hello,

i want to run the following code every time i open a specific workbook,
but i get everytime an error message Compile Error: Assignment to constant not permitted.
What i wanna do with this code is to hide the Row And Column Headers.
I dont want to use it from the Excel Options-Window menu, because i want to assign this code only to several files not to all.
Anybody knows why it doesnt run?


Code:
Private Sub Workbook_Open()

With ActiveSheet.DisplayHeadings

xlRowHeader = False
xlColumnHeader = False

End With

End Sub


Thank you all,

Bianca

Grid Headers
Hi all
I am building a grid. My grid has nice column headers. When the user clicks on the header it should index/order on that column.

Where and how do i put the code?

I know it is in the grid_click but how do I know what column?

if grid.col(0).click then
code
end if

what is the event or property (grid.?????)

Listview Headers
Hi can anyone tell me the easiest way to add column headers and set their widths, when a form loads.

Get Column Headers
I read an XML into Excel, then I want to get the column headers into a string array. Check the pic for explanation

Thanks

Column Headers
I have a VB6 app that returns data from a MySQL database to an Excel sheet. I can retrieve the data to Excel, but can't seem to get the column headings from the MySQL table to the Excel sheet. Can someone help me with this? Thanks.

Flexgrid Headers
hey i was how to get like two headers like this....

----------------------------------------------------------------------
HEADER ONExxxxxxxxxxx|HEADER TWOxxxxxxxxxxxxxx|HEADER THREExxxx
----------------------------------------------------------------------
ONE|TWO|THREE|FOUR|ONE|TWO|THREE|FOUR|ONE|TWO|THREE|FOUR
----------------------------------------------------------------------
xxxx|xxxxx|xxxxxx|xxxxx|xxxx|xxxx|xxxxxx|xxxxx|xxxx|xxxxx|xxxxxx|xxxxx
----------------------------------------------------------------------

i was just wondering can it be done???

MsFlexgrid, Headers
Hello,

I'm currently having some problems with the MsFlexgrid control. I have managed to get data in the flexgrid bot Somehow the first row is empty. I think this row is reserved for column headers but How can I remove this row (use it for data).

Attached is a screendump of the form

Thanks,
Patrick

Listview Headers
I have developed a customer request tracking application for work, heavily
reliant on listview controls for displaying requests by status, customer etc
Just a few cosmetic issues ...
In report view the icon in the listview header never lines up with the icons in the list.
For example, I have a column containing nothing but different coloured flags to represent status. The listview header is the same icon except just an outline. They are the same width and I have programatically set the width of the column header to the width of the icon. However the header icon is always offset to the right by a few pixels which is a bit messy.
Also, I am using full row select. When an item is selected the highlight draws a white box around the icons which looks messy. These are standard 16x16 pixels with transparency.
How do I get around this? It doesn't affect the functionality, it's just a little annoying.
See attachment.
Thanks in advance,
AL

Https Headers
How do I view the https headers on a HTTPS page that is controlled by the Webbrowser control. Any help would be appreciated. Thanks!

Column Headers
Is there anyway to disable a column headers width from being adjusted during run time.

Dazza

HTTP Headers
Hi,

I'm trying to create a login system that works with a website.

Basicly I connect to the website like,

usernameassword@www.website.com and test the username and password against HTACCESS on the webserver.

If it returns a 200, then the login must have worked.
If it returns 401 (Unauthorised), then the login failed.

This is my code (I'm new to VB lol , i know it's not great )


Code:
Private Sub cmdOK_Click()

Dim Internetaddress As String
Dim LoginHeader As String
Internetaddress = "http://www.website.co.uk"
'First we check if the username and password have been entered.
If txtUserName = "" Or txtPassword = "" Then
MsgBox "Please Enter Your Login Details", vbCritical
End If

'We now have the username and password, so lets check we can access the internet.
If InternetCheckConnection(Internetaddress, FLAG_ICC_FORCE_CONNECTION, 0&) = 0 Then
MsgBox "Connection to" & Internetaddress & "failed!", vbInformation
End
Else
'We must be able to connect to the Internet so lets check the Username and Password
With Inet1
.Protocol = icHTTP
.URL = txtUserName & ":" & txtPassword & "@" & Internetaddress & "MaxPoster"
LoginHeader = Inet1.GetHeader
End With
If InStr(LoginHeader, 404) Then
FrmMain.Show
frmLogin.Hide
End If
End If
End Sub

I've never used the Inet control before, or have a good knowledge of instr, so any help that can point me in the right direction is much much appreciated.

Mpeg Headers
hey all.....ive been working on a steganography program for a while...i finished the audio bit with a bit of help from this forum..
http://www.geocities.com/kyanpardiwalla/wavstego2.zip

i was wondering about video steganography...now my goal is not to decode the individual i,b,p frames or to get mpeg frame info...all i need to do is to get the postions of the actual data so that i can modify the LSB. I tried to get the GOP (Gr. of Pictures) header out but ive searched around and cant find an article explaining the mpeg header. Anyway my interest is not merging, playing or anything...i just need the start and end bit position of the actual data of the frames and if possible the start and end of the position of audio.

thanks a ton.....
Kyan

DataGrid Headers
I've searched the forums and found nothing on how to change the contents of the headers in a MSHFlexgrid. Plenty how to change the format, but not content.
Is it possible? Using the data field names is unsightly to me, plus, I want the user to be able to customize the first three column headers.

Listview Headers
I want my listview to display something like this:

Code Description Selling Price Qty Unit Date Purchase Price

if I will use this code:

VB Code:
Sub FillListView(lstProdLookUp As ListView, rsProdLookUp As ADODB.Recordset)    rsProdLookUp.Requery    lstProdLookUp.ListItems.Clear    If Not rsProdLookUp.BOF Then        rsProdLookUp.MoveFirst        Dim a As Long        Dim lst As ListItem        While Not rsProdLookUp.EOF            Set lst = lstProdLookUp.ListItems.Add(, , rsProdLookUp.Fields(0).Value)            For a = 1 To lstProdLookUp.ColumnHeaders.Count - 1                lst.SubItems(a) = rsProdLookUp.Fields(a).Value            Next            rsProdLookUp.MoveNext        Wend    End IfEnd Sub

it will display the data in listview according to how the fields are arranged in my DB and i dont want it that way. If i rearranged my fields i would have problem again with my other listview's display.

I tried this code but only one record is displaying


VB Code:
Set lst = lstProdLookUp.ListItems.Add(, , rsProdLookUp("Code")) 'DISPLY IN LISTVIEW      lst.SubItems(1) = rsProdLookUp.Fields("ProductDescription")      lst.SubItems(2) = Format(rsProdLookUp.Fields("SellingPrice"), "###,###,##0.00")      lst.SubItems(3) = rsProdLookUp.Fields("Quantity")      lst.SubItems(4) = rsProdLookUp.Fields("Unit")      lst.SubItems(5) = rsProdLookUp.Fields("EntryDate")      lst.SubItems(6) = Format(rsProdLookUp.Fields("PurchasePrice"), "###,###,##0.00")


any suggestions please?

Headers In A List Box
Is it possible to have column headers in a list box? If so, how do you set it up?
I have a list box that will have 3 columns. It will be pulling data from an excel spreadsheet that will fall under "Qty," "Width" and "Length." I would like to place those three names at the top of each column in the list box and lock them there. Can this be done? Thanks.

FlexGrid Headers
Searched the forum and couldnt find anything to help me with this. Loading a MSFlexGrid from a database using the following code and cannot get the formatstring to work on this one mdi child form although it does on the others. Any help would be appreciated.


VB Code:
Dim SQL SQL = "select po,orderdate,vendor,invoice,idate,total,code,codedesc,recdate,reconciled from invoice order by reconciled" Data.DatabaseName = App.Path & "db.mdb" Data.RecordSource = SQL Grid.FormatString = "PO|Order Date|Vendor|Invoice|Invoice Date|Total|Code|Description|Rcv Date|Reconciled"

How To List Headers
hello guys,

can you tell me a way to list all the 1st level headers from a document and display it in a new page
thanks and regds
venki

How To List Headers?
hello guys,
can you provide me with the api's to list all the headers from a document?
thanks and regds
venki

Http Headers
Is it possible to send http headers to a webserver with winsock and could you give an example like if I wanted to send:
'Accept-Language: en-us'?

Thanks for your time!

Column Headers
How can I change the caption on a column header on a bound datagrid control?

Thanks!

Effective Headers
[hello] VBers

OK so I am in search of the information that would be nice to have on top of each sub or function I write.

I know that the name is one good thing to have, and then a section to list who created the sub or function, the date this was done and what was done, a list of arguments passed, and so on.

But is that enough? Have you seen a header that made you say Wow that is cool, well I would like to know about that header.

I think the header is well worth it, and it can help in times when you are looking at the code that you wrote a year or two ago.

Thanks for your sharing.

Habib

HTTP Headers
I need the list of headers that Internet Explorer uses to retrieve a webpage. I need all of them, like referer, etc. Thank you!

Raw Web Browser Headers
Does anyone know the sequence of requests you send to the HTTPS (secure) server (using Winsock)? And, for authentication sites, I know you have to encode the login at base64, but exactly how do you form the header?

Any help is appreciated. Thanks

Reading Mp3 Headers With Vbr
Anyone have some idea how to read mp3 headers that have the variable bit rate?

All the readers I`ve tried cant cope with it; the duration is reported as being way too long.

Eg a 4 minute song is reported as being about 12 mins long!


Thanks

Getting Internet Headers Via API?
I want to find out the size and last modified dates of a given url (say http://www.some.com/some.exe or some.jpg) using API or regular vb code functions only (no inet transfer control). Alternately, this can be done using the webbrowser control (again, NOT the lousy inet transfer control). All help appreciated.

the code should NOT download the actual file. this step is a preliminary to comparing the date and the local filesize to seeing if an internet update is necessary.

thanks!

MSFlexGrid Headers...
Just started playing with Flexgrids...Im sure there will be more ?'s to follow....

How do I label the Header Row??


thnx

Packet Headers
Need to know how to insert internal ip address to a packet header being directed to an external ip. purpose is for routing to a network computer from an external machine.

Getting Raw Http Headers
hi,

do you know any website or code which i can use to sniff the raw http headers that are obtained in the html form.

Eg. I want to read "HTTP/1.1 200 OK" in the header and so on

Get HTTP Headers?
Hi,
I'm writing a program and in part of it i need the program to get all the http headers from a site when it opens it.
i wrote the basic code for it that i thought would work but it only gives the pages http header.

heres the code i wrote:


Code:

Private Sub GetHeaders_Click()
With Inet1
objResponse = .OpenURL(txtURL.Text)
txtResponseHeaders.Text = Inet1.GetHeader
End With
Set objResponse = Nothing
End Sub



Could someone please help me, I'm not very experienced in this area and i know the question is a bit confusing

Thanks

Excel Headers?
I'm creating event sheets and on the left side of the header I want it to have two lines, one for the event name and below that the date (Name is in cells A1 and B1, Date is in cells A2 and B2). Then on the right side of the page in the header I want two rows, one for the location (Cells A4 and B4) and time (A3 and B3). Should I use the Visual Basic editor for this, and what's the code? Thanks!

Database Headers
I am using a MSHFlexGrid control and want to know if its possible to make the Headers behave like command buttons so they can be clicked?? I want the users to be able to click on a Header and the database should sort by that field.

Thanks,

Copyright 2005-08 www.BigResource.com, All rights reserved