I have a userform with a listbox that has 6 columns (D2:I50) which works great. In column J (J2:J50), I have data which needs wrapping so I plan on putting it in its own listbox. Is it possible to have another list box but one that operates as the first one is scrolled?
I have more than seven if statements but don't know how to connect them.
works =IF(C2=$A$2,13,IF(C2=$A$3,7,IF(C2=$A$4,5,0)))works IF(C2=$A$4,,IF(C2=$A$5,3,IF(C2=$A$6,3,IF(C2=$A$7,3,IF(C2=$A$8,3,IF(C2=$A$9,3,IF(C2=$A$10,3,IF(C2=$A$11,3,0))))))))can these be connected? they work for me separately but not all in one.
I've tried Named but that doesn't work because there are way too many things I need to do w/ it.
Im writing a program in VBA excel that displays two circles in excel spreadsheet, these two circles have been set X and Y Co - ordinates. Using the X and Y Co - ordinates i want to connect a line from shape 1 to shape 2
When I select multiple values from the listbox, how do I apply the selected set of values (user can select up to 10 out of 80) to a range of cells in a different sheet (in the same workbook), which cannot contain any blank cells?
I was trying to move data from excel to access database in VBA. not sure if this has been done before.
What i have got at the moment is that there are some data in excel spreadsheet that i can dump into the table in the access database. My problem here is i need to be able to open the database first, set up connection, and then perform SQL insert query command.
So in the worksheet, i have a button with the following codes in it so far i could just manage to open the database as follows
Is there a way to connect direct to the newsgroup below via OE6: microsoft.public.excel.worksheetfunctions It doesn't appear in the newsgroups' list ..
how to do this with Java but not VBA, I have the capability of understanding it I just need to know where to look because I can't seem to find any solid information on the net from my searches. Does anyone have any websites, other threads or anything they could direct me to for this kind of thing.
I was contemplating putting this in the Access thread but I want to connect to Access through Excel so I think it fits both.
My plan is to use a macro to send specific cells to five seperate tables in an Access database using VBA and SQL.
I've created a button on a sheet that triggers the creation of a checkbox on the ActiveCell. I also want the checkbox to link to the activecell in order to use the TRUE or FALSE values in an AutoFilter. I used the following code, but the checkbox doesn't link to the ActiveCell. I thought it might be because the LinkedCell = "TEXT" whereas a Range isn't text?
Sub AddHoekCheckBox() Dim MyRange As Range Dim CBLeft As String, CBTop As String, ctlName As String Dim cbObj As OLEObject Dim MyDoc As Worksheet Set MyRange = ActiveCell CBLeft = CallByName(MyRange, "left", VbGet) + 0.25 * CallByName(MyRange, "Width", VbGet) CBTop = CallByName(MyRange, "Top", VbGet)...........................
1. population a combobox in excel vba using code as opposed from a sheet 2. population a listboxin excel vba using code as opposed from a sheet 3. population a combobox in excel vba using text from a file as opposed from a sheet 4. Getting the values from a combobox on a form to populate cells on a worksheet
These list boxes and comboboxes will be on a form.
I have a listbox (form control) on an excel sheet, where the user can select (or deselect) multiple entries.
Is there a way to have vba spit out which options are selected? if I choose "single" for selection type, it will tell me which option i have selected. Is there something similar for multiple?
How to put these multiple listboxes in my form that allow the end-user to make selections and then after they are done, click the submit button that queries the results. I have read so many books and nothing in the books works.
I created a query that includes all the fields in each of the listboxes. For example :
[Code] ....
This way each listbox and there are 11, has distinct values based on my qual_main table and it connects to whatever the other table is that contains the actual values I need to pull. The listboxes display correctly yet when I put the query in my button to run it based on what the end-user selected from the listboxes, it does nothing. I have tried several things and the last code I tried is as follows:
I'm trying to make two multi select listboxes in excel. I have tried I myself, but I know the excistence of VBA only since one week .
In sheet1 I have a number i.e. 50 in "A1" . First I want to make a list of this number, so cell "A2" = 1, "A3" = 2, .... "A51" = 50. This range has to be variable since the number can be 1 but als 100.
Then I want to populate ListBox1 in sheet2 with the list from sheet1. Next I want a second ListBox (ListBox2) and two buttons ("Add item" and "remove items") to move items from ListBox1 to ListBox2 and back.
Finally i want the selection that is made in ListBox2 to be put in sheet1 in a specific column (let's say C) where "C1" is the first selected item from ListBox2 "C2" the second and so on. This range has to be variabel since the number of selected items is not known.
I'm trying to get my macro to connect to Infomaker and run a query. I have successfully done this in the past by using the record macro function. But, when I try to record the macro and paste the query syntax from Infomaker into the commandtext box of the connection, I get the "too many line continuations" error.
I've been looking at ways to write the code rather than record, but the syntax for the Infomaker queries doesn't seem to mesh well.
The syntax of the query in Infomaker is (copy/pasted, all "'s are necessary):
Any way to find out what list boxes are on the active sheet with vba? I have a massive file loaded with listboxes, some copied from other sheets. I am trying to copy the selected value from to the worksheets themselves. I can pull the selected item from the Cell Link's Index or the bound item, but only if I specify the listbox. There are 57 sheets and up to 6 listboxes on a sheet, Do I have to go through and give them all individual names, such as the sheetname_listboxname.
I have used a userform found on this forum (I cannot find the link) that displays row data from a range within a listbox. Unfortunately though you cannot determine the column width. As such I wondered if it was possible to show the data within other listboxes. So for example in listbox1 you can see 5 columns accross (from a range) however one of them is very wide.
Looking at Listbox1 you can only see the firsy 20 characters approximately in each column. Is it possible therefore that once this row of data is selected that the contents of the columns is duplicated in other listboxes on the same userform that can be expanded to accommodate larger text?
I am using a userform and i have added some data to listboxes but it comes as being too long when it is only one character. I checked in properties to change the settings and tried to change everything but it doesnt work.
I have two excel sheets, one loads up in Listbox1 and the other in Listbox2, i would like to be able to see if any entries in listbox2 match with entries in listbox1 and then to display the matches in listbox3 with a click of a command button. Is this possible? If so, how would i go about it?
I am trying to clear check boxes and list boxes on multiple worksheets within a workbook. Below is what I have,but doesn't work. Note: the "bottom " code does work to clear selected cells of their data. I tried to create a macro for the list boxes selecting "----" which I have as the last entry in the vlookup table but was totally unsuccessful at.
Sub cleardata() Dim Obj As OLEObject Dim ws As Worksheet
I am designing a userform that involves a listbox that I am having trouble with. Please note I have little experience with vba, so I don't understand most codes.
I want to make a mulitcolumn listbox, populated with the attached pivot table. I really do not know where to start, and there is no "populating multicolumn listboxes for beginners" instructions anywhere on google or in here. At least, none that I understand.
What I am trying to create is a 2-column listbox, where in the first column, the "code" fields are shown, and in the second column, the corresponding " Name" fields are shown. In the pivot table, you can see how several routes fall under a service, and several services fall under a pc, etc.
How do I get the listboxes to pre-populate based on the Userid and Option Button selection? Furthermore, write back to the correct cell once the selection has been made?
How can I get the combobox to remove blanks in the Userid? (if each cell in row2 has to be populated then so be it)
I have a fairly straightforward UserForm with 4 listboxes and 4 option textboxes (the textboxes do not need to be a part of the validation I'm needing). I then have a command button that I want to be enabled ONLY if ANY of the 4 Listboxes have a selection. I've tried the "Change" event code below and it works upon the first selection of any listbox item.
However, if the user de-selects all selections in the listboxes (i.e. they are all unchecked), the command button remains enabled. I need the validation logic to enable/disable the button to persist as long as the user has the form open and if there is not a selection in ANY of the listboxes. The reason being is that if they click the command button it will update the cells in the worksheet, which if empty may overwrite previous work completed with blank cells.
I have 6 Slicers in called "Quantrix" The slicers are called REG, DIRECTOR, AREA MANAGER, AOI, DMA, AG and CLOCK. I have 15 pivots (6 in Quantrix tab and 9 in a tab called "Pivots").
I have vba code to update all pivot cache (showing 1 pivot update below) ...
Here is the code to disconnect SLICER, update source data for ALL pivots then reconnects slicer... This works great but its ONLY 1 SLICER
PHP Code:
Dim vPivots As Variant Dim i As Long Max = Sheets("eLink_Raw").Cells(Rows.Count, "A").End(xlUp).Row With ActiveWorkbook.SlicerCaches("Slicer_REG").PivotTables
[Code] .....
How can i disconnects ALL Slicers, change source data for ALL Pivots then reconnect ALL slicers?
Code: Sub Button1_Click() Dim cnt As ADODB.Connection Dim rst As ADODB.Recordset Dim stSQL As String Dim SNfound As String 'Your sqlserver 2008 connection string Const stADO As String = "Provider=SQLOLEDB.1;" & _ "" & _
[code].....
but i dont see where to put in the Database object...
The Database it needs to connect to in SQl is called
The Server name is SQLSRV when you expand databases the database is called SWHSystem the Table is called dbo.Credential and from that i need to get SELECT All from the Name and CardNumber from dbo.Credential and put that in a New Sheet titled Personal