I have a worksheet with a few "Multi-Select" type listboxes in it. I cannot seem to select the items within those listboxes... the mouse icon doesn't even change, it just shows that little plus-sign that is the default when you're just in your worksheet. (they're also ActiveX listboxes)
I can select them if I go into my Developer tab and select and deselect the "Design Mode" button. then everything works fine (mostly). Or if I resize the subwindow for the workbook. Then it (again, mostly) works fine.
It's like I have to trick Excel into allowing me to click on the checkboxes in my ListBox.
Some people I've given the file to use Excel 2007 and the file works for them. (I have Excel 2010)
I've looked up info on bound/unbound forms, but I can't tell if it applies, or how to use that. They were not created with a VBA macro, they were made using the buttons in the developer tab.
One final thing : Below the listboxes, I have some shapes that, when pressed, will take the selected items from their respective checkboxes and put them into some cells.
If someone clicks "A" in listbox1, I want to select "1" & "4" in listbox2. If someone clicks "B" in listbox1, I want to select "2" & "3" in listbox2. etc.
I have 8 car models in column A of sheet1 and I have a list box control with every car model on sheet 1 as well. I would like code to select all the models from column a in the list box with code.
I am trying to create a data entry form with a text field and a listbox. The list box is populated by another sheet and the text box will be used to enter names. I need to be able to enter a new name, select multiple options from the list box and then click a button to add this info to a sheet in excel.
I have read about changing the list options to allow this etc - the problem is I can't get the results to go back into excel - all I get is a name with nothing from the listbox.
changing two variables a various amount of times and running the same procedure and copying the resutls into another sheet. Seems like a perfect place for a macro. However, these variables can be chosen from a list that the user wants. So why not build in a listbox for each one. Now I have two listboxes one for variable A and one for variable B.
The procedure in theory goes something like this we change variable A from the base case and then run the procedure for variable B, get the results, then run the scenario again but changing only variable B abnd repeat. Then once, all of the variable B scenarios are done, I want to change the variable A and then repeat and so forth.
That is the background and my main problem at this point, is that have these values in two listboxes, I know how to do the for each loops and such, however, I do not know how to do them for values in the listbox.
How do I identify the values selected in the respective listboxes and then pull them so I only use them for the for each loop?
I could swear I used to be able to cut and paste columns in Excel 2010, but for the past week I haven't been able to. When I click on a column and do a right click, "CUT" is greyed out. I can cut any section, but not a whole column.
I'm on mac Excel 2010 and i'm trying to delete rows..but for some reason they don't go! My workbook is a basic one, just filled with a bunch of formulas, i can't understand why it wont let me delete it.
When i do try to delete it, nothing comes happens and when i try to delete a large amount it comes up with 'not enough memory, continue without undo deleting rows' but my laptop has 8GB and my other laptop has 16GB so i can't see why a 16GB laptop wouldn't be able to delete it.
From one moment to another I am not able to set the column width doing the following: right-mouse-button click (the column) and choose column width and then type in the desired width The column width is not set this way.
Setting the column width by dragging the right side of the column works well. Also double clicking the right side of the column (auto width) works fine.
I think I have pressed a certain key combination (I am not aware of) to activate this behavior.
How can I re-activate/enable the above (1st) mentioned method to change the column width?
I need to make a excel costing model to calculate various products prices. I am using Excel 2010.
I have many products and do not need all of them displaying at the same time, therefor I inserted a Checkbox (ActiveX Control) that hides my columns that I do not need. I did that by inserting the following and it works fine :
[Code].....
The problem is I now need to lock certain cells so that they can remain fixed and the recipe cannot change.
Once locked my checkbox no longer works and I get the following error :
"Run-time error '1004': Unable to set hidden property of the range class"...
i have encountered a problem which happens when you write data that contain : in an excel sheet (i use excel 2010)
for instance if i enter to one of the cell 45:58 excel sees it as 01/01/1900 21:48:00 when i try to get the information by using a function i will get the wrong data for example typing in the different cell LEFT(Cell,5) will result 1.908
(i receiving the data from an outside source in this way and i need to make analysis)
i have noticed that the first 2 digits (21 in the example) are related to the number i have choosen in a 24 hour cycle for instance
24:58 will result 01/01/1900 00:58:00 26:58 will result 01/01/1900 02:58:00 48:58 will result 02/01/1900 00:58:00
I have a listbox with 8 columns. Multiselect is enabled, and it must stay this way. As part of my program, after the user presses a command button, I need to use the row indexes of the selected rows in order to copy the selected information into an array which is then placed in a different listbox, and then delete the items from the original list. Pseudocode of what I want to do:
[Code] .....
But my understanding is that .ListIndex does not work this way with multiselect listboxes. I've tried searching for a solution for a while, but I cannot find one.
Just recently My Excel 2010 has decided to not let me right click to format cells, delete or insert rows. I can do these functions from the ribbon, but not via right click. this happens in both existing spreadsheets where I am the author, or even a brand new spreadsheet like in the image below. we have restarted the computer, Uninstall and reinstalled Office and still get same symptoms. I got here thru google but cannot find an answer anywhere.
I am very computer literate and even our IT personnel have looked at this with no answer. as you can see in the image, these options are greyed out.
I use Excel 2010 andexample.xlsx cannot make my code working because of the so famous errore above.
I have several pivot tables (pt) in different worksheets (ws), and a list of items stored in an array I created. I've written a macro for setting ON all items in pt except those ones in the array (listOffnet within the code). Everything works properly.
Now, I would like to do the complementary action: setting OFF all items that are not in the array. Unfortunately, I get the error at line:
I am using this code (below) to hide certain rows or columns depending on what number is entered. Everything is working fine and I am at the point where I would like to share this excel sheet with others but I would like to lock certain cells so that others cannot alter the formulas. As soon as I lock the cells and then enter values into the unlocked cells, I get the "run-time error '1004': Unable to set the Hidden property of the Range class".
I am using excel 2010 x64.
Code: Private Sub Worksheet_Change(ByVal Target As Range)If Not Intersect(Target, Range("B3")) Is Nothing Then If Range("B3").Value = 0 Then Columns("G:P").EntireColumn.Hidden = True Else If Range("B3").Value = 1 Then Columns("H:P").EntireColumn.Hidden = True
I watched a video on youtbe. And the women had three or four items in drop down box. She was using vba. When i emailed her to ask her how she did this, she kept telling me to go to her website and i was supose to figure it out on my own. I am trying to do a start up construction company. the link to her site is as follows Select Multiple Items from Excel Data Validation List - YouTube the idea of what i want to do, is how she clicks on a word and it follows in the coloumn to the right going down. This is what i need to know how to do. It is probably pretty elementary to many of you. But i build, i know how to read prints, to cut footprints for new homes etc. But when it comes to excel i am so green.
A great chance to use the HTML Maker for the first time!
What I would like to do here is show how many of each value there is in the range.
So for 7B-MA5, it would say 6. For 7B-MA4, it would be 2 / 1 / 3, since there are 3 unique values and their counts respectively. Finally for 7B-MA3 it would say 3 / 3
A formula option would be great but I'll also take a macro option since it is a macro that generates these lists in the first place, so I could just add the new code to the end of it.
I have data that is formatted in an Excel 2010 table. The two columns in question are [Invoice #] and [Description]. In the description column I have descriptions of products as well as freight. The same invoice number would be tied to the product description as well as its associated freight. I need to filter out certain product types and their associated freight items.
The macro I wrote creates an array of invoice numbers that I want to filter out and leave the remaining invoices, but I can't get the filtering part to work. Here is my code:
Dim Invoices() As Variant 'array of invoice numbers Dim Descriptions() As Variant 'array of Descriptions Dim InvoiceFilter() As Variant 'array of invoice numbers to filter Dim i As Integer 'counter Dim j As Integer j = 1
[Code]...
What happens now is that it filters out all values in the Invoice column instead of only the values in the InvoiceFilter array.
Using Excel 10, Win 7, a User Form with list box control, I only need one column about 7 characters long. (At this point my horizontal scroll bar is taking up more room than the list box window so I'd really like to lose it). I don't see any property options for scroll bars to set.
method. It seems like the limitation is in the Countif function going over 1000 (or some other size limit)
I have a list of ~1500 rows, of that there are approximately 55 unique items. Doing the unique array works correctly up until item ~40, upon which it fails by returning the 1st item only (for the rest).
Trying to debug, and pulling out the Match section, it functions up until 976 (that is
MATCH(0,COUNTIF($N$1:$N40,$C$3:$C$1500),0)
returns 976) anything after returns just 1 (1st item).
It seems to be a limitation on the text string size that COUNTIF can handle.
In the coming months the company i work for will be transferring from Excel 2003 to Excel 2010 (i know, a little late......) and now i am testing some things at home.
We deliver lots of Excel reports to our clients where we are using Pivot tables. In excel 2003 we where able to hide items from the dropdowns using properties - hide items but when i now open an excel 2003 file in excel 2010 and want to filter the pivot table to (let's say) another month i see all my hidden items.
Is there an option in excel 2010 to hide items like i could do in 2003? (either regular option or VBA)
Hope this is fairly easy to solve. I have Screen #1 with a listbox with a CLICK event. The event populates a combobox below (with items based on listbox's selection). Listbox is NOT multi-select. Code runs fine manually, i.e., user opens screen selects from listbox, then can select from combobox.
I now what to open and make selections from another form/screen, Screen #2. I've written code to select the proper item from Screen #2's listbox but this does NOT trigger the listbox's CLICK event for me so the combobox isn't populated so I can then make that selection from Screen #1, also. I've tried setting focus to listbox first, then making selection, but that doesn't work.
QUESTION: Is there code that selects from a listbox in a way that mimics the user clicking the selected item in the listbox?
The alternatives I can think of are: 1) Change Screen #2's listbox code from CLICK to CHANGE event, but I'd rather not. 2) Move CLICK event code to sub-procedure and then call from both listbox CLICK and Screen #2 code 3) Some sendkey string like ENTER?
Would be easier to just mimic the user click, if possible.
With frm_Screen2 'Select item type from listbox With .LBox_Items
The sheet shown, Complaints, lists on each row information on a single complaint. This information extends from Col A to Col Y (though not that way here, the data actually begins in row 3). I want to highlight a Customer cell, say H227 for Customer A, then activate a macro that (1) recognizes the active customer (here A), searches the list, identifies each row where A is the customer and then writes each row into sheet "Event" beginning in row 4. I should then see the same A to Y cells of information, beginning in row 4, filled in sheet Event for the six customer A complaints. Note, the actual data in sheet Complaints involves 300 rows of data, and over 100 customers can be on the list, some up to 15 times. I know that I could do this by filtering the data, copying and pasting, but a simple macro would be quicker for the group of individuals involved. Note, I then use this information to populate a chart.
What I'm trying to do. I have two separate requirements:
(1) To add the whole array to a listbox on form initialization - see Sub UserForm_Initialize() (2) To clear the listbox and re-add only certain items based on what's typed in a textbox - see Sub txtSearchTerm_Change()
I have two errors:
Error 1 in UserForm_Initialize()
The listbox contents need transposing! It is displaying as
Code: 1 2 3 4 5 Tom Ben Heidi Julie Mark Smith Jones Evans Simpson Petersen x@yo.com a@bo.com c@do.com e@fo.com g@ho.com 02071001022 02071001026 02071001027 02071001028 02071001029 Friend
When it should be displaying as : Code: 1 Tom Smith x@yo.com 02071001022 Friend 2 Ben Jones a@bo.com 02071001026
Is there a way to transpose the array?
Error 2 in txtSearchTerm_Change()
I cannot find anywhere - even on MSDN - all the information I need how to correctly add a single record to a multiple-column listbox! What I'm trying is:
Code: For i = 0 To UBound(SearchList) If InStr(1, SearchList(i), SearchTerm) 0 Then With lstPeople .AddItem For j = 0 To UBound(PeopleList, 1) .List(c, j).Value = PeopleList(j, i)
[Code] ......
How do I add a record to the listbox????
Full code for reference:
Option Explicit
Private PeopleList As Variant Private SearchList As Variant Private Sub UserForm_Initialize()
I am wanting to create a list where I can select multiple items within that list and then print only those selected items. I have created something similar thru data validation, but I can't get it to print.
In addition, I would like to be able to subdivide the list into multiple categories, then select items from these multiple categories and print them.
I have a form with a main list box and several other list boxes. I drag and drop records from the main list box to the others. When I drop a record onto one of the list boxes, a corresponding worksheet is updated with the same record. This works just fine.
The problem I have is:I close and re-open the form after having added some dataDrag/Drop a record to the list boxThe worksheet won't find the first empty rowExample: If the worksheet already contains 4 rows of data, I have to drag/drop 5 times before the fifth row will be updatedI would like to drop the data the first time and have the first blank row updated
Notes:
1.) I have tried variations of "xlUp", "xlDown", and SpecialCells(xlCellTypeLastCell) in the "Worksheets("Monday")... line of code; all to no avail.
2.) The cells contain formatting (borders)
Here is the relevant code:
Code:
'Copy items from the list box to the worksheet For intI = 1 To ListBox2.ListCount For intJ = 1 To ListBox2.ColumnCount If IsEmpty(Worksheets("Monday").Cells(intI + 1, intJ)) Then Worksheets("Monday").Cells(intI + 1, intJ).Value = ListBox2.List(intI - 1, intJ - 1) End If Next intJ Next intI