listbox #3

I want to make a selection (entire row) from a worksheet en place this row(s) 
in a listbox.
So far I'm able to place the cells from the selected row vertically in the 
listbox, but I want the row horizontaly (in columns) placed in the listbox.
When I use the next formula, I get all the rows horizontally

    With ListBox1
        .ColumnCount = Range("rFactTot").Columns.Count
        .RowSource = "rFactTot"
        .ListIndex = 0
        .MultiSelect = fmMultiSelectMulti
        .ListStyle = fmListStyleOption
    End With

But I want to add an if--then statement that only places rows which meet the 
criteria from rFactTot I want.

Anybody knows the solution??



0
luthor (2)
4/3/2006 6:29:03 AM
excel 39879 articles. 2 followers. Follow

2 Replies
614 Views

Similar Articles

[PageSpeed] 33

    With ListBox1
        .ColumnCount = Range("rFactTot").Columns.Count
        .RowSource = Range("rFactTot").Address
        .ListIndex = 0
        .MultiSelect = fmMultiSelectMulti
        .ListStyle = fmListStyleOption
    End With


-- 
 HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"luthor" <luthor@discussions.microsoft.com> wrote in message
news:C12735BB-D879-4FF1-BB76-C9E39D5410F3@microsoft.com...
> I want to make a selection (entire row) from a worksheet en place this
row(s)
> in a listbox.
> So far I'm able to place the cells from the selected row vertically in the
> listbox, but I want the row horizontaly (in columns) placed in the
listbox.
> When I use the next formula, I get all the rows horizontally
>
>     With ListBox1
>         .ColumnCount = Range("rFactTot").Columns.Count
>         .RowSource = "rFactTot"
>         .ListIndex = 0
>         .MultiSelect = fmMultiSelectMulti
>         .ListStyle = fmListStyleOption
>     End With
>
> But I want to add an if--then statement that only places rows which meet
the
> criteria from rFactTot I want.
>
> Anybody knows the solution??
>
>
>


0
bob.phillips1 (6510)
4/3/2006 7:37:57 AM
Bob,
This is not what I want, the macro looks like this:

Private Sub UserForm_Initialize()
    If [rFact].Count = 1 Then
        MsgBox ("Er is nog geen factuur aangemaakt")
        Unload Me
        End
    End If
'Selecteren niet betaalde facturen en plaatsen in listbox
    Sheets("Factuurlijst").Activate
    Dim factuur As String
    Dim dag1, dag2 As Date
    Dim nr, waar, tel As Integer
    waar = 0
    tel = 2
    nr = Range("rFact").Cells.Count - 1
    For i = 1 To nr
        tel = tel + 1
        dag1 = Date
        dag2 = Cells(tel, 2).Value
        dag3 = dag1 - dag2
        If Cells(tel, 5) <> "X" And dag3 > 30 Then
            factuur = (Range("A" & tel).Value) 'this should be the complete 
row A, how do I do that
            ListBox1.AddItem factuur 'add the complete row to the listbox
            waar = waar + 1
        End If
    Next i
    If waar = 0 Then
        MsgBox ("Er hoeven geen aanmaningen verstuurd te worden")
        End
        Unload Me
    End If
'now I get the complete worksheet and I want only the items from factuur in 
the listbox
    With ListBox1
        .ColumnCount = Range("rFactTot").Columns.Count
        .RowSource = Range("rFactTot").Address
        .ListIndex = 0
        .MultiSelect = fmMultiSelectMulti
        .ListStyle = fmListStyleOption
    End With
End Sub

I hope you understand what I want
with regards
Luthor
(The Netherlands)


"Bob Phillips" schreef:

>     With ListBox1
>         .ColumnCount = Range("rFactTot").Columns.Count
>         .RowSource = Range("rFactTot").Address
>         .ListIndex = 0
>         .MultiSelect = fmMultiSelectMulti
>         .ListStyle = fmListStyleOption
>     End With
> 
> 
> -- 
>  HTH
> 
> Bob Phillips
> 
> (remove nothere from email address if mailing direct)
> 
> "luthor" <luthor@discussions.microsoft.com> wrote in message
> news:C12735BB-D879-4FF1-BB76-C9E39D5410F3@microsoft.com...
> > I want to make a selection (entire row) from a worksheet en place this
> row(s)
> > in a listbox.
> > So far I'm able to place the cells from the selected row vertically in the
> > listbox, but I want the row horizontaly (in columns) placed in the
> listbox.
> > When I use the next formula, I get all the rows horizontally
> >
> >     With ListBox1
> >         .ColumnCount = Range("rFactTot").Columns.Count
> >         .RowSource = "rFactTot"
> >         .ListIndex = 0
> >         .MultiSelect = fmMultiSelectMulti
> >         .ListStyle = fmListStyleOption
> >     End With
> >
> > But I want to add an if--then statement that only places rows which meet
> the
> > criteria from rFactTot I want.
> >
> > Anybody knows the solution??
> >
> >
> >
> 
> 
> 
0
luthor (2)
4/3/2006 8:39:02 AM
Reply:

Similar Artilces:

sending email #3
Having a problem with outgoing mail, seems to not be going anywhere? Running Exchange 5.5 sp4, with Outlook 2002 clients. A client clicks 'send' the message goes to the sent items folder, but the message never makes it to the outbound mailbox. All services are running, the ques are empty, but the "out" folder in imcdata has tons of 'messages' dated since yesterday afternoon. Any help on how to get these to "GO" ?? Thanks in advance for any help. Hi Dave, I would suggest turning up logging on the Information Store and the Internet Mail Service...

Leading Zero #3
A value in text format, e.g. 07654 in an export csv file looks just fine in Notpad. But when the file is opened in Excel, the leading zero is gone. Is there a way to add the zero back to all the values under the same column within Excel? Thanks, Eli ...

ING Direct #3
Thinking about opening an account here. Will it link to my Money file? Thanks for your reply. (I'm not at my home computer or I would check it out myself) Scott ING Direct no longer links allowing you to connect and update from within Money. To update you have to go into the ING Direct Web site and download your transactions to Money. On Thu, 26 Aug 2004 08:46:32 -0700, "Scott W" <ScottW2000xx@Yahoo.com> wrote: >Thinking about opening an account here. Will it link to my Money file? >Thanks for your reply. >(I'm not at my home computer or I would check it...

more than 3 conditional formats #2
Is it possible to add more than 3 conditional formats to a particula cell? Any help would be much appreciated. Thanks, - -- Message posted from http://www.ExcelForum.com Hi A No, you'd need a macro to do the formatting with >3 conditions. HTH. Best wishes Harald "abailey >" <<abailey.18da03@excelforum-nospam.com> skrev i melding news:abailey.18da03@excelforum-nospam.com... > Is it possible to add more than 3 conditional formats to a particular > cell? > > Any help would be much appreciated. > > Thanks, > -A > > > --- > Me...

ANN: HTTPMP
HTTPMP is MAPI transport service provider used to access HTTP mail service accounts (commonly Hotmail). HTTPMP could be used with MAPI compatible client applications (such as Microsoft Office Outlook) to send/receive Hotmail messages in much the same way as POP3 transport. Supported features 1. Sending/receiving messages 2. MIME encoded messages 3. HTML, RTF and text formatted message body 4. Messages with attachments 5. LAN and dial-up mail service account access and polling 6. Auto dial and auto hang-up 7. Fast asynchronous Internet operations 8. Internet connection configuration page HTTP...

How do I find the inside page in the 3-panel brochure.
I am trying to make a 3-panel brochure and all that seems to be available is the side shown in the brochure options. When I print, it prints both sides yet I can see no way to access the inside part. Thanks. View, status bar... this will allow you to change page views, you will see the page tabs at the bottom of the screen. I am not sure I know what you are asking. Are you saying you are printing the brochure sight unseen? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "springmtn" <springmtn@discussions.microsoft.co...

Report names in listbox
I recently upgraded to Access 2007 and am having some trouble with the changes. I have a form with a listbox in which I would like to display the names of all the reports in the database. I've tried using the following as the rowsource for the listbox, but in form view nothing is displayed. Does anyone know how to do this? TIA, Ken Warthen kenwarthen@gmail.com "SELECT MSysObjects.Name FROM MSysObjects WHERE (((Left([Name],1))<"~") AND ((MSysObjects.Type)=-32764)) ORDER BY MSysObjects.Name;" I think you made a slight typo. Try (((Left([Name],1))<>&quo...

Rank #3
I Have a list of about 50 differnt numbers. The numbers are constantly changing. I need to figure out who many points behind the highest score is each individual cell. Example: a1=50 a2=45 a3=33 a4=59 So in column B i want to say that a1 is 9 points behind the leader. A2 would be 14 points behind the leader. Any idea's? John in B1 put: =MAX(A:A)-A1 and drag down. Regards Trevor "John" <John@discussions.microsoft.com> wrote in message news:8099D9AE-476F-4240-998A-7B50F57E1E4A@microsoft.com... >I Have a list of about 50 differnt numbers. The numbers are...

value from field not accepted within onlineform (3.0 -> 4.0)
Hy, We just tried to update our running CRM 3.0 to 4.0 there where nearly no problems! (1 report was not upgradeable) We where very happy. but right now a real problem was discovered: the fields: longitude and latidude from the contact form are no more accepted. Enter a value beetween .... But the values do perfectly match within the range When I delete the values I can save the form. When there is any value in the fields it causes the error: Enter a value ... Best regards for any help ...

copying formulas #3
This is probably a simple question for most of you, but I have an exce file that contains approx. 400 sheets, with a summary sheet. How do copy a simple formula to read Cell B1, but the next sheet needs to rea Cell B2 and so on. Example: Sheet #1 is the summary, then sheets 2-40 have a title taken from the summary, so if I do a typical copy formula it keeps reading Cell B1. Hope my question is clear!!! Thanks -- Ladkin ----------------------------------------------------------------------- Ladkins's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3252 View t...

How do we close an invoice in version 3.0?
In version 1.2 we had an Action on the toolbar to close the invoice. Now we have nothing. I tried customizing the form and adding the statecode, but that field is Read-only and so it didn't help. We mass-print all of our invoices and need them to be closed (not deleted) once they are paid. HELP! Thanks, Karla So sorry!! I did not see Invoice Paid on the Actions menu once the invoice was open. Solved!!! "KK" wrote: > In version 1.2 we had an Action on the toolbar to close the invoice. > Now we have nothing. > > I tried customizing the form and adding...

Indirect and Address Functions to Determine Schedule #3
I am struggling with writing an Excel formula that I would greatl appreciate some help on. In theory this sounds quite simple. I have a table which shows th progression it takes, in months, to move from one 'level' to the next. Another larger table shows how a number of 'starting' individuals woul progress through their levels based on the progression table mentione earlier. e.g. [FONT=courier new]Progression Table[/FONT] ----------------------- Months Level One 1 Level Two 2 Level Three 3 etc. Duration Table # of People Jan Feb M...

i cannot send any emails through my CRM 3.0.
i cannot send any emails through my CRM 3.0. The strange thing is that i can only send emails to myself, but not anyone else. what should i check and where to detect the problem? Check the SMTP configuration on your CRM server. There is a good chance you chose the "default" SMTP setting during the setup and this requires SMTP to be configured on the server itself. You can run a "Repair" installation and it will allow you to change the SMTP config. -- Matt Parks MVP - Microsoft CRM "Maria" <Maria@discussions.microsoft.com> wrote in message new...

include more than 3 data series as columns in combination chart
I am making a combination chart and am only able to include the first 3 data series with the column chart part. The rest of the series are all included with the second series which has a much larger value. On Tue, 26 Jun 2007, in microsoft.public.excel.charting, Cindy <Cindy@discussions.microsoft.com> said: >I am making a combination chart and am only able to include the first 3 data >series with the column chart part. The rest of the series are all included >with the second series which has a much larger value. Ignore "combination" charts, you don't need the ...

Trendline Equation #3
MS Excel allows users to create a trendline on a plot based on a number of points. One option to display is the equation for the trendline that was created. How can I extract this equation?? I know copying and pasting the equation to a cell works, but I'm assuming there's a better way to get the equation. Thanks. Use the LINEST function. For more on how to use for functions other than linear graphs see Bernard Liengme's http://www.stfx.ca/people/bliengme/ExcelTips/Polynomial.htm If you must get the coefficients from the trendline, search google.com's archive of the XL n...

custom header #3
I would like to know how to set up a custom header which shows the data in a perticular cell (i.e. - C9 shows the number 100, so I want the header in all the pages,except the first, to show "100". Thank you One way is to use a macro. Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim myHeaderStr As String Dim iCtr As Long myHeaderStr = Worksheets("sheet3").Range("C9").Value For iCtr = 2 To Worksheets.Count Worksheets(iCtr).PageSetup.LeftHeader = myHeaderStr Next iCtr End Sub (I used c9 on sheet...

J2EE to CRM 3.0
Does anyone know how to get a J2EE app to access data held in CRM 3.0? TIA -- Simon Morris CRM exposes two public webservices, one for the businesslogic and one for the metadata. You should be able to connect to those webservices using J2EE. -- Jeffry van de Vuurst CWR Mobility www.cwrmobility.com -- "Simon Morris" <SimonMorris@discussions.microsoft.com> wrote in message news:71EB635C-631C-49F7-A836-47900536CC64@microsoft.com... > Does anyone know how to get a J2EE app to access data held in CRM 3.0? > > TIA > -- > Simon Morris Hi Jeffry, Thanks for t...

Importing Records in to CRM 3.0
Hello, On a monthly basis, I import a CSV into the Leads area of CRM. This worked well in 1.2 where I was able to select the "Target" field(s). When I tried this same technique in 3.0, I noticed the "Target" field contained the target field info, but was disabled thus not allowing me to change if I want to. Is this new in 3.0 and if so, is there a work-around Hi Kathy, I guess the target fields which are disabled must be mandatory fields for the lead. In V3 it was enforced that mandatory field has to be mapped and so this restriction. If right source field is ...

Union Query with 3 tables
I'm trying to use a Union query with 3 tables to combine the following fields. Not all customers have a territory or broker; however, I would like al lthe customers listed in the output. Thanks for any help Customer Number from table 1 Territory Name from Table 2 Broker from table 3 What you are looking for is not a UNION query. A UNION query merges like data from multiple record sources into a single result set. In my experience, it's most common use is to normalize a poorly structured database. I believe what you want to do is create a query that links your Customer t...

3 Personal Folders
I have 3 copies of the same "Personal Folders" folder. They are all 3 exactly the same. When I right click on one of them to close it, the option is greyed out. How can I get rid of the extra two copies? To remove extra PST(s) from the folder list: Outlook 97 or Outlook 98/2000 (Corporate Mode) - On the Tools menu, click Services. - Highlight Personal Folders service you want to remove and click "Remove". Note: Standalone users require 1 Personal Folders Service. Those connecting to an Exchange server normally do not use a Personal Folders file when mail is kep...

Help with calculation #3
On sheet2 I have a list of dates where A1 is 01 Jan 2004, A2 is 01 Feb 2004 etc through to 01 Oct 2005, against each date is a column of figures. So A1 is the date and B1 is the volume. On sheet1 I want to have a formula that will calculate the total volume between 2 dates selected by the user, where D7 is the earliest date and D9 is the latest date. So after they have input the dates the volumes between those dates will be totaled and shown in E10.(They will only be able to input dates for the 1st of the month - so as to match the data held on sheet2.)As you appreciate there will be more tha...

Publisher cannot open the file #3
I upgraded Office Small Business Professional 2000 to SBP 2003. Now I cannot open files created in Publisher 2000. Please help - would have never bothered to upgrade had I known this was coming! Thanks Are you running Norton Antivirus by chance? -- JoAnn Paules MVP Microsoft [Publisher] "Publisher 2003 Upgrade" <Publisher 2003 Upgrade@discussions.microsoft.com> wrote in message news:55771BEE-74C1-4D58-9B89-2514A06C0B3E@microsoft.com... >I upgraded Office Small Business Professional 2000 to SBP 2003. Now I >cannot > open files created in Publisher 2000. P...

Out of Office AutoReply #3
Hi, All I would like to ask you a question regarding one function of Outlook Express or Outlook. Since I got a mail from someone with the subject: Out of Office AutoReply Of course I sent them mail before and they just out of their office and I think they did some setting so that the system can auto reply to the sender for them. So do you know how to make it?? Thank you very much! If you are in an Exchange environment (ask your administrator if you do notknow) you can set the Out of the Office Assistant which is located under Tools. If you are not in an Exchange environment you can c...

IMAP and Outlook 2003 #3
Microsoft claims you can configuring Microsoft Outlook to connect to an Internet Message Access Protocol (IMAP4) server. I have set up the account in Outlook, but it works poorly. Articles in the knowledge base seem to admit that it works poorly. Is Microsoft attempting to force the use of Exchange? Has anyone had sucess with IMAP and Outlook? If so, how? Which server did you use? Darren <delafieldpc@verizon.net> wrote: > Has anyone had sucess with IMAP and Outlook? Outlook 2003. in my opinion, a poor IMAP client. It works, but it's not really production quality. I unde...

CRM 3.0 walkthroughs
Anyone knows where to get CRM 3.0 Walkthroughs using .NET 2003 and 2005? If you haven't already done it, download the CRM SDK from http://www.microsoft.com/downloads/details.aspx?FamilyID=9c178b68-3a06-4898-bc83-bd14b74308c5&DisplayLang=en. You find a lot of additional samples in the internet. beside my own site (link below), look at http://www.microsoft.com/dynamics/community/relatedcommunitieslanding.mspx#EKH to get a list of CRM community sites. -- Michael http://www.stunnware.com/crm2 ---------------------------------------------------------- "Cubalibre123" <Cu...