vba listbox question

How do i add stuff to a second column in a vba listbox.. i feel reall
stupid but i've tried endlessly and searched the internet with n
joy...

Also how can i use info from a particular column..

eg.

Surname/name are 2 column headings (assuming i can get stuff in the 2n
colum)

i wanna take data from 'surname' without takin the 'name' data wit
it...

I know this is really simple basic stuff so can someone put me out o
my misery

--
Message posted from http://www.ExcelForum.com

0
9/16/2004 11:46:12 AM
excel.misc 78881 articles. 5 followers. Follow

14 Replies
481 Views

Similar Articles

[PageSpeed] 19

Could someone please help me? This is really annoying and i can't get o
with my work until i know how to do this..

--
Message posted from http://www.ExcelForum.com

0
9/16/2004 11:54:26 AM
Wow didnt realise it was that hard to use multiple columns on 
listbox... no wonder i couldn't do it..
Why does it have a 'columncount' property if its stupidly hard to pu
stuff in anyother column than the 1st one.....
Cause if a forum full of experts cant help me then im pretty muc
f**ked... can someone atleast tell me if its possible

--
Message posted from http://www.ExcelForum.com

0
9/16/2004 12:20:01 PM
-bump

--
Message posted from http://www.ExcelForum.com

0
9/16/2004 12:47:41 PM
[column1]   [column2]
-----Z----------X---------





Above is a listbox.... i wanna put data where the 'x' is.. but it keep
going where the 'z' is... 
is that explained beta?
loads of people viewing but not helping... :

--
Message posted from http://www.ExcelForum.com

0
9/16/2004 12:55:18 PM
Can someone please help me? It sounds really simple, but i cant get it
to work so its getting really annoying...


---
Message posted from http://www.ExcelForum.com/

0
9/16/2004 1:07:27 PM
    Your table A1:B10

    Dim x As Integer
    Dim y As Integer

    x = Application.WorksheetFunction.CountA(Sheet1.Range("A1:A10"))

    For y = 1 To x
        ComboBox1.AddItem (Sheet1.Range("A" & y).Value & " " &
Sheet1.Range("B" & y).Value)
    Next

-- 
----------------------------
Mauro Gamberini
"Devitt >" <<Devitt.1cocey@excelforum-nospam.com> ha scritto nel messaggio
news:Devitt.1cocey@excelforum-nospam.com...
> How do i add stuff to a second column in a vba listbox.. i feel really
> stupid but i've tried endlessly and searched the internet with no
> joy...
>
> Also how can i use info from a particular column..
>
> eg.
>
> Surname/name are 2 column headings (assuming i can get stuff in the 2nd
> colum)
>
> i wanna take data from 'surname' without takin the 'name' data with
> it...
>
> I know this is really simple basic stuff so can someone put me out of
> my misery?
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


0
maurogsc1 (3)
9/16/2004 1:10:13 PM
"Devitt >" <<Devitt.1cofm4@excelforum-nospam.com> skrev i melding
news:Devitt.1cofm4@excelforum-nospam.com...
> [column1]   [column2]
> -----Z----------X---------
> Above is a listbox.... i wanna put data where the 'x' is.. but it keeps
> going where the 'z' is...
> is that explained beta?
> loads of people viewing but not helping... :(

Start behaving and I may reconsider.

Best wishes Harald


0
stf (176)
9/16/2004 1:16:13 PM
Ok that didn't work just put all the stuff in coloum 1 of the listbox..
but thank you for replying!!! i think ill just give up and smash th
absolute fuck out of the pc monitor..

hmm.. ill try explain again cause i aint too good at it

you know how you can set the amount of columns for a listbox?
Well all i wanna do is set a listbox to have 2 columns and put the wor
'rabbit' in the 2nd column. When i try myself, the word 'rabbit' appear
in the 1st column everytime

--
Message posted from http://www.ExcelForum.com

0
9/16/2004 1:23:42 PM
Harald Staff wrote:
> 
> Start behaving and I may reconsider.
> 
> Best wishes Harald [/B] 

If you'd been waiting 2+ hours for help on something you know is ver
simple and that is restricting you from finishing your project, you'
be pissed off too..

--
Message posted from http://www.ExcelForum.com

0
9/16/2004 1:25:47 PM
PLONK!!!

-- 
----------------------------
Mauro Gamberini

> Can someone please help me? It sounds really simple, but i cant get it
> to work so its getting really annoying...
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


0
maurogsc1 (3)
9/16/2004 1:28:21 PM
:confused:


---
Message posted from http://www.ExcelForum.com/

0
9/16/2004 2:43:22 PM
"Devitt >" <<Devitt.1coh0x@excelforum-nospam.com> skrev i melding
news:Devitt.1coh0x@excelforum-nospam.com...
> Harald Staff wrote:
> >
> > Start behaving and I may reconsider.
> >
> > Best wishes Harald [/B]
>
> If you'd been waiting 2+ hours for help on something you know is very
> simple and that is restricting you from finishing your project, you'd
> be pissed off too...

This is a worldwide internet community where users from all timezones of the
globe assist other users, voluntarily and for free. I get pissed off when
people like you are impatient, rude and treats this as some kind of paid AND
lousy service. Do your own homework, brat.

Best wishes Harald


0
innocent (844)
9/16/2004 2:48:05 PM
> :confused:

We noticed ;-)


0
innocent (844)
9/16/2004 8:47:21 PM
Maybe:

Option Explicit
Private Sub ListBox1_Click()
    MsgBox Me.ListBox1.Value
End Sub
Private Sub UserForm_Initialize()
    With Me.ListBox1
        .ColumnHeads = True
        .ColumnCount = 2
        .BoundColumn = 2
        .RowSource = Worksheets("sheet1") _
                        .Range("a2:b100").Address(external:=True)
    End With
End Sub

(although I agree with Harald and Mauro.)



"Devitt <" wrote:
> 
> How do i add stuff to a second column in a vba listbox.. i feel really
> stupid but i've tried endlessly and searched the internet with no
> joy...
> 
> Also how can i use info from a particular column..
> 
> eg.
> 
> Surname/name are 2 column headings (assuming i can get stuff in the 2nd
> colum)
> 
> i wanna take data from 'surname' without takin the 'name' data with
> it...
> 
> I know this is really simple basic stuff so can someone put me out of
> my misery?
> 
> ---
> Message posted from http://www.ExcelForum.com/

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
9/16/2004 10:30:41 PM
Reply:

Similar Artilces:

Transfer Files Using VBA
Hi, I'd like to transfer files from several drives on my pc to one cetnral location. From A:\Office1\ B:\Office2\ C:\Office3\ To D:\HeadQuarters\ My routine now is the following 1) Copy the files from drives: A, B, and C; and then 2) Paste the filesto the D drive 3) Delete the files permanently from drives A, B, and C. As you see this is a tedious routine, which I'd liket o avoid by using VBA. Can someone start me off with some code on how to accomplish this. Thanks so much in advance! Jrew Jrew, You could create a batch file (from the olden days) using XCOPY and desired bel...

Usage Question
Hi, Not sure if this is the proper arena for this post, but.... Have a usage / functional question regarding Outlook, suspect this is a common problem with many... Here is the scenario: 1. Send an email to someone, do NOT copy the email to myself so it just goes in my sent mail. Here are two problems that arise out of this function: 1. If I am awaiting for a response / need a response to that email what is the BEST way to re-tickle myself if in fact a response to that email is not received? At this time I remember manually in some form a flag, task or just plain old memory. 2. Once ...

Date question 01-14-10
Can anyone help with this function: =IF[Date Parts Ordered Completed]+ [Date Part Completed]+[Date Purchasing Completed],not blank,=Date The goal is that is all three fields have a date in them, then put in today's date in the final field. If one of the dates is missing, then the final date is blank. The only problem is if I open up that form I do not want it to change the date to today. I want it to stay the date of the actual completion. Any help is greatly appreciated. Thanks, P-Chu -- Message posted via http://www.accessmonster.com Try this -- Completion_...

VBA problems
Hello, I just started messing around with VBA and I got something approaching what I want (what I want is to highlight a row based on a value in the 1st column). This is highlighting the wrong row though! It looks like all the numbers are correct... for instance, when I step through it, I'll get the correct row selected but a different row highlighted! Please shed some light on this! It's quite frustrating. ' first column has dates from 12/2003 to 12/2006 Private Sub Worksheet_Activate() Const Yellow = 6 Dim row As String Range("A1").Select Do While...

School question
True or Faled The Table Template is used to automate data entry in a table. We don't typically answer school questions in these newsgroups, but even if we were going to, we generally like the question to be complete and make sense. -Scott "deborah Camp" <deborahCamp@discussions.microsoft.com> wrote in message news:E79CEB83-12AC-4B88-8146-5ACED58279A2@microsoft.com... > True or Faled The Table Template is used to automate data entry in a > table. Scott M. wrote: > > "deborah Camp" <deborahCamp@discussions.microsoft.com> w...

OWA Question #10
Hello, we're running Exchange 2003 and I have the following situation. Several employees in our company decided to start a different branch. Instead of creating a separate domain we just created a new account in AD with a different domain suffix. So let's say they used to have account@companyA.com. But now they have account@companyB.com. They've been able to access email via Outlook just fine but when accessing it via OWA, they are unsuccessful. We've tried logging them in with both companyA.com and companyB.com domains in the login screen. companyA.com just retur...

continous form question
Hi, I have a 'continous form' which gets its data from a table. Im using a form for ease of use by the operator and data is displayed in text boxes. My form has 6 columns and thousands of rows - so many records in the table. (its pretty much like an excel spreadsheet). However, on my form, i have a text box and i want the text box to change to eg VBred, if the time on the current record matches the time on the next record. (obvousley time is one of the pieces of data and displayed as hh:mm) As my form is a continous form, if i add my 'colour' text box to ...

Excel Question: How to Delete All Blank Rows from a worksheet?
Hi, I'm brand new, and that is my question. I just spent 2 hour laboriously mousing along deleting row by row, every other row thinkin there's gotta be a better way. (I could've done it of course if the were adjacent, but they were interspersed with my good data). I'm little behind the times: agile with keystrokes but less so with mous [think I was quicker in Lotus DOS! (actually "TWIN")]. But I do play mean piano -- Message posted from http://www.ExcelForum.com Check out: http://www.cpearson.com/excel/deleting.htm#DeleteBlankRows "DaveThePianoGuy >...

File Conversion Question
backup.pst Outlook 2003 version Can this be converted to be restored into Outlook 2002? What other possible solutions could be employed? Thank you. denise.ciaralli@bell.ca <anonymous@discussions.microsoft.com> wrote: > backup.pst Outlook 2003 version > > Can this be converted to be restored into Outlook 2002? Only by using Outlook 2003 to create a 2002-format PST and then copying or exporting the data to the 2002-format PST. -- Brian Tillman Thank you! >-----Original Message----- >denise.ciaralli@bell.ca <anonymous@discussions.microsoft.com> wrote: > >...

Updating MS Office 98 for Mac to newer MS Office version & other questions
Hi! I have a Mac iBook with a Power PC G3 Processor, Disk Cache: 4096k, Virtual Memory 129 MB, Built-In Memory 128 MB, Machine Speed 600MHz (so it says in the system profiler...I don't really know what all this means and if someone has an easy explanation, I'd appreciate it). Though it came with OSX, I have been running it on OS 9.2 because I purchased Microsoft Office 98 for Mac (Word, Excel, Powerpoint) back in 1999 for my last Mac (a desktop), so I loaded it onto this iBook when I got it. My question is, can I qualify for an update of MS Office? From browsing the web I noticed ther...

General SOA question
As I was reading SOA Manifiesto, one line got my attention "SOA can be realized through a variety of technologies and standards." as of now, only way I can think of implementing bussiness service at this time which is decoupled and scalable is though web services. This gives cross platform/scalable/maintainable. Is there any other way we can implement services which has the same things? Thanks, I just started working with SOA, and the way I understand it (which is not very thorough at that) is that SOA is basically web services taken to the next level of interoperability (a...

Public Folder Question #4
Is there a way to enumerate all folders and posts (including attachment labels where applicable) and redirect to a text file or CSV in a similar fashion that the DOS tree /F /A command would work? Thanks! ...

ListBox concatenation
Hi Am trying to use two listboxes. LB1 (say) holds the result of choices on dblClick made in LB2. I would like to be able to select several options in LB2 and display them LB1 but am having difficulty as the second selection overwrites the first. VB uses a 'multiline' property but don't know an equivalent in Access VBA. Any help appreciated Mick "Mick" <mick.whyte@gmail.com> wrote: >Hi > >Am trying to use two listboxes. LB1 (say) holds the result of choices >on dblClick made in LB2. > >I would like to be able to select several options in LB...

Profile question...
One of the small networks I manage had a Win2k DC that crashed. We replaced it with a 2008 SBS & since most of the clients were XP, I was able to join computers to the new domain & copy the profiles from the old location to the new location. That was until I got to the Vista laptop. On this computer, the profile shows as 'Unknown' & the 'copy to' option is grayed out. I am currently copying the contents of the C:\Users\username folder to the C:\Users\user.newdomain folder. Will this be all I need? Is there an easier way? Also, under system properties>u...

database question / feedback needed (GP8
Hello Everybody. We sold one of our companies, and the new owners are moving off Great Plains. They are transferring/rebuilding data in their new software on their own. For historical (GP) data, they have purchased some software to perform queries, and have requested I give them the data. I am planning to send a backup of the SQL Company dbase. They would not have a GP client, and would not be performing transactions - so I believe they really just want to access the various history tables. I prefer not to send the Dynamics dbase if I don't have to (passwords, etc). I guess my ques...

VBA
I having problems using the My Outlook Calendar.dot template from the Slipstick website (sorry I can't attach it, file type not supported). I downloaded the .dot file and with the help of someone in IT we modified the code to pull event details from outlook onto the resulting calendar report. I was able to use it successfully for a few weeks and then all of a sudden the .dot stopped working. It gives me a runtime error whenever I try to launch it. I'm not familiar with VBA at all but I used the debug tool to see where the code "breaks". It seems to happen at L...

Cell Reference question
This is probably a simple question, but I have never seen it before. I have been looking at some spredsheets sent by some co-workers, trying to figure out their structure etc... and I have seen some cell references where the reference starts with an =+'sheetname!e2 The + (plus sign) struck me as odd, I can't recall seeing that before. Is there some significance to it? Thanks Tom Believe it's a "legacy" behaviour for die-hard Lotus converts <g> The "+" is not necessary .. -- Rgds Max xl 97 --- Please respond in thread xdemechanik <at>yahoo<dot&g...

Custom Formatting numbers question
I have a spreadsheet with lot of millions numbers floating around. When I make graphs out of it, there's too much zeros. I don't want to divide all the numbers per 1 million. Is there a way to custom format those numbers with a mask that would take care of that problem for me ? i.e. 7 456 890.98$ would be represented with 7,457 M$ tia Double-click the numbers on your chart. Hit the Scale tab. From the Display units drop-down, choose Millions. ******************* ~Anne Troy www.OfficeArticles.com "Junkyard Engineer" <jevandenbroucke@hotmail.com> wrote in messag...

An Interesting Question: How to Have Mutliple Variable Input
Greetings! I would like to define a user-function that takes a range (or Yes/No values) as input, and returns a 1 if any of the values is yes. I'm something like thinking... FUNCTION YorN (choices) yorn=0 counter=1 to length(choices) yorn=yorn.OR.index(choices(counter)="YES") Next counter End Function I know the syntax is wrong -- can someone help me out? Thanks.../Randy Hi try =--(COUNTIF(A1:A100,"yes")>0) without using VBA at all -- Regards Frank Kabel Frankfurt, Germany "Randy Numbers" <ran@hotmail.com> schrieb im Newsbeitrag news:4Hk1d.3...

Separating parts of a string in VBA
Hello, I have a string in cells(1,1). The value of the cell is "DATE" 1/1/10 THRU 3/1/10" I want to separate this string into the two new strings such that one string would read "1/10/10" and the other would read "3/1/10". In C programming, this would be fairly easy. But in VBA I don't know any string functions which can read and compare individual characters. Does anyone know how to accomplish what I am trying to do? thanks IF the DATE and THRU parts of your example text (along with their adjacent blank spaces) appear in all the text s...

vba excel project
im not sure if this is possible in excel... but here's what my boss wants... one excel file (master file) contains 10 command buttons (sheet 1). when a user clicks on a button (button 1), an excel template file (template 1) is automatically opened... now this template file will be filled up by the user, and once she/he saves the template (template 1) with a new filename, the date and time (of saving) will be listed on the master file (sheet 2) together with the specified filename of the user. now if the user clicks on button 2, template 2 is opened. and then once saved, the date,time a...

Here's a dandy question regarding queues!
Hello everyone, I've setup some workflow for the Task entity, such that when it gets assigned to a user, that user gets an email notifying they have been assigned a new Task. What I would like to do is to include in the subject line the name of the queue of where it came from. Is this possible? How? ...

Newbish question re. Out of Office Assistant sequence
Hi all, I'm the sort-of administrator in the office (I know enough to get by, but I'm far from an expert). My employer in our very small company wants to start using the Out of Office Assistant to reply to external as well as internal addresses, which I think I've figured out how to do. I'm concerned about spam, though. We have some very good Trend Micro spam blocking software that has blocked 99.9% of all the spam we've gotten in the last six months. I'm not sure how the sequence works, though. Does the Trend Micro spam blocker have a chance to "swat&quo...

Off-Line file question
Outlook 2003 running on XP SP2 I've enabled my pst files to be synchronised Off-line - what I can't fathom out is where I point Outlook on my laptop to, to enable it to use the Off-line pst when not connected to the network. I'm probably missing something very simple here, but can someone enlighten me? Thanks PST-files? OST-files are being used to cache the Exchange mailbox. Could you tell us a little more about your setup like account types being used and where you store all your data files? -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Prop...

2 questions
Hi, I need help in finding where to post for windows 7. Kindly advise as to which newsgroup I should be addressing. Secondly, I was trying to uninstall a 3rd party program using "Programs and Features" in the Control Panel. It used to be called "Add/Remove Programs" in WinXP. I highlighted the program I wished to uninstall, and clicked "uninstall". That little progress circle that goes around and around drove me crazy and I waited for about 10 minutes for the OS to gather "configuration information" about the program to be uninstalled. ...