What I want to do is have a ComboBox (I think it should be a ComboBox, I want the user to be able to select multiple options at once) and display the names of the worksheets in the ComboBox. I could not find a way to do this directly with rowsource and thought about writing a loop to check the current worksheets with their names and put the values into cells, to this way have the names displayed in the ComboBox via rowsource?
I have a form created, were the user can select up to three pairs of open worksheets for sheet subtraction, to see where Im going with, aka the big idea see here: Column Subtraction With Criteria Via Box & Produce Results In New Workbook
What I dont know how to do, is get the form in the attached workbook to show all the available worksheets. Specifically, from the dropdown combo box, I would like it to list all open worksheet title in all open workbooks.
I will preface with what I am trying to do. I want to populate a combo box with months. The list will be populated based on a the date range in a dataset, so all 12 months may not bee populated in the combo box. I want the months to be listed in the combo box with their text names displayed(Jan, Feb... Dec) but have their numerical values when selected (1,2... 12). I'm sure there is a way to do this, but for the life of me I can't find how. My initial thought was to assign a value to a specific list index, i.e. assign the value of listindex 6 as "Jun", but I can't figure out the syntax to do that.
This doesn't work, but might give some insight into what I am trying to do
if a combobox in a userform can be populated by the NAMES of defined ranges in a worksheet?
ie. worksheet contains 3 NAMED arrays: W1 = $C$5:$E$6, W2 = $C$8:$E$9, W3 = $C$11:$E$12. Have the combobox in the userform actully list W1, W2, W3 so that when W2 is picked (for example), cell $C$8 will be selected.
I am having trouble with populating a combo box on a user form. I wish for the combo box to be populated using the names of the sheets of the workbook. I am using sheet1 as the control sheet where a user form will open up from this sheet, this will allow me to select the sheet that I require from a combo box that is placed on the form however I do not seam to be able to code the VBA to populate the combo box with the sheet names.
Is it possible to count the number of comboboxes on a userform? Or better yet can I fill an Array with all the combobox names on a userform? I can count the controls on a userform but I'm trying to count just the comboboxes? Instead of all the labels and textboxes and frames.
I would like to loop through them for validation instead of doing it by each one by itself!
I am adding a list of file names to a combobox list and want to filter this by adding only the filenames that have been modified today. I have used the FileDateTime(Fil) but it leaves the combobox empty. I am using the code below. how to add only the files modified today.
I am fairly new to macros and have trouble with VBA. I have a file with multiple worksheets. Each worksheet contains the name of a specific location in cell A8. I want this name in cell A8 to be the name on the worksheet tab for each worksheet in my file but do not know how to accomplish this. Is that even possible?
I use a web query to import into an excel workbook. As data is changed on the web that the query runs against, I would like the name of the sheet that is being imported into to change to one of the cells that is being imported.
I have a worksheet that I am using to collect information about individaul jobs. I have entered combobox's on the sheet not in a userform. I have it working well but it will not copy the combobox's to a new sheet. Here is the code I am using.
I have this long list of data (company name, company ID and OIC) on sheet 1.
Then on sheet 2, user will key in the company name manually then the company ID and OIC name will auto-populate (i did the match index already on this one) before filling in the other cells.
How do I make the cell to auto-complete the company name by using the list of data in the other sheet? Do I use the combo box? If I use the combo box, will it affect the match index formula i created for company ID and OIC?
I have a worksheet, and I want to place a combobox in a cell, but being able to add values not on the corresponding list. Done almost everything, but cannot find a way to use the position of the cell, so I can dinamicly place a combobox. Ex.- place a combo in a cell, then after you get the value, delete the combo and put it in the cell bellow, etc. In order to do this I need the position of the cell: left, right, height, width.
I have a userform with comboboxes and listboxes etc. The comboboxes have drop down lists which are populated from data in columns from a worksheet.
1.) During the execution of the userform, a value is selected from the combobox, which is place in a column on another worksheet. So far so good. If I select the same value again, nothing shows up in the row below the first selection. If I choose a different value it shows up. I have tried using different properties of the combobox but have not been able to get around this.
2.) I would like, when the excel file is opened that the userform is ready to go, ie enter data. I have tried putting the Private Sub Workbook_Open() UserForm1.Show End Sub
in "ThisWorkbook" module but have had no success with it.
I'm wanting to use the drop-down combo box as a simple way for the user to choose what type of search they wish to perform on the spreadsheet. The search algorithm chosen depends upon the current value show in the combo box.
I have a userForm to add holiday record into this worksheet. UserForm has one comboBox (userIDList) to search userID from ='Jan-July'!empName1 which is from A11 ( named Range as empName1). I am trying to add holiday details ( I mean the dates) in column T to CA ROW as per userID. I do not have any clue how could I pass the data (Holiday dates) from user form to the worksheet. Columns T10:ca10 titles are dated (01/01/2008,02/01/2008..... 29/02/2008). Do I have to use find or Select CASE. At the moment I can locate empolyee as per userID and then select the row. I have attached the xl file.
Private Sub addButton_Click() Dim sfind As String Dim cl As Range Dim fromDate, toDate As Date 'check for a value & show message Sheet = "JanJuly" Sheets(Sheet).Select Application.ScreenUpdating = False If Me.userIDList.Value = "" Then 'the textbox in userform Me.userIDList.SetFocus Exit Sub Else..................................................
I have this logic that clears cells in all WS in WB.
The logic is using each sheet name to reference the logic to clear the contents. Look:
Private Sub CommandButton1_Click() ActiveSheet.Unprotect Password:="" With Application .ScreenUpdating = False .EnableEvents = False Response = MsgBox("This Action Will Prep For A New Week. Do you want to Continue?", vbYesNo) If Response = vbNo Then Exit Sub End If
I am trying to have a ComboBox activate a specific sheet based on the value of "ComboBox1.Column(1)". I have many sheets to select from so i want to avoid using the Case method Here is a small sample of my code that isn't working:
I am working on a macro that runs when a combobox is clicked. The combobox is imbedded directly in the worksheet, not in a form.
Basically, the user clicks the down arrow on the combobox, selects one of the available choices, and the choice selected is written to the spreadsheet - each time the selection is made, it is written to a successive row in the spreadsheet - keeping track of every selection made.
The macro works, mostly. But problem is that if the user repeats a selection in the combobox (makes a choice, and then in the next cycle makes the same choice) the macro doesn't run - nothing happens.
Here is the code:
Private Sub ComboBox1_Change() i = Cells(2, 4) ' value in cell D2 Cells(i, 6) = Cells(4, 9) ' selected value from cobobox stored in cell I4 ' This value copied to column F - successive rows i = i + 1 ' counter to increment row for next value Cells(2, 4) = i ' Update cell D2 with new i value End Sub