I'm looking to set up a combo box with different year options and add functionality so the data that can be seen on the sheet at a given time is driven by the combo box year value. (functionality somewhat like a webpage, where once you choose a certain value from a drop down box, you see data corresponding to the value)
I'm using a ComboBox ,ComboBox2_Change(), to Call and run 1 of 4 different macros. It works fine if I choose a different item in the list each time, but if I choose the same one, it won't run the macro a second time.
I have a combo box that I have populated with choices (months of the year). I require users to select the month they wish to view their payslip with and then press "Go" (a command button) and jump to the worksheet that contains their payslip info. How do I get VBA (Excel 2007) to do this please? I have tried on the CommanButton1 code page to type
If combobox1.value = "May" Then Goto Worksheets("Sheet3")
This doesn't work and I know I'm doing something wrong as I remember when I was doing my project at school you had to give each combobox selection a value like 0, 1 or 2 but I cannot remember how to do that!
I have three textboxes (16,17,18) that need to be disabled if a certain value ("Regular Hours") is in combobox1. Would I use an If statement? Also, is there a way to "gray out" the textboxes to show they are disabled?
3 work sheets nameWorksheets "InfoData" to save month NameWorksheet "Jan" for JanuaryWorksheet "Feb" for February1 x ComboBox = monthBox 4 x CommandButton = Week1Button,Week2Button,Week3Button,Week4Button --------------- I have Problem opening worksheet from userform. Name of the months are in Combox. So when I select month January from comboBox and click on Week 1 command Button it should open worksheet named "Jan" and Select Cells(2,1) to show Week 1. And Same for week 2, week 3 and week4 but will select different Range or cells. I have attached the screenshot of userform and also the workbook.
Private Sub Week1Button_Click()
For i = 1 To 13
If monthBox.Value = Worksheets("infoData").Cells(i, 1) Then
I am trying to create a macro that will allow the user to select choices from combo boxes on a userform. The choice of one combo box determines what will be shown in the next combo box and so on. This will occur a set number of times (depending on what they are looking for), at which point the list of possible choices will be presented.
I populated one combo box in UserForm_Initialize() but then I might have to change the others with Combobox1_Change()...
i have a user form with 4 combo boxes and one text box. what i've tried to do is make it so that if the month combo box reads january, then all of the info is placed in a worksheet called january. at the moment it is putting all the info inputted into one sheet. if some one could take a peek at the code below.
If cbomonth.Value = January Then Sheets("January").Select
Range("A1").Select
Do If IsEmpty(ActiveCell) = False Then ActiveCell.Offset(1, 0).Select End If Loop Until IsEmpty(ActiveCell) Or IsEmpty(ActiveCell.Offset(0, 1)) Or IsEmpty.....................
I thought I had finished my project but I keep getting errors, the latest one being that I have 2 comboboxes on userform "timekeeping". When I press the commandbutton "Submit", I want the values in the textboxes on that form to be placed in the spreadsheet, depending on what the selections the user has made in the comboboxes but I keep getting an error saying that the macro doesnot exist in the workbook even though it does!
The file is too big to upload here so it is found on rapidshare
I have a field with a "YES"/"NO" drop-down box. There are three fields below which have some default formatting (thick purple dot-dot-dash borders). When the drop-down field is "YES", those three fields should change borders to a single thin black bottom border line.
OK... so that's the setup. And I should note here that it does in fact format properly. However, the problem I'm having is that the screen does not update / repaint with the new formatting. The thick purple dot-dot-dash borders remain, for the most part.
If I page down, then page back up, the new formatting appears just fine. When I switch from "YES" to "NO", again, the formatting changes, but the screen does not update/repaint so the only way to see the new formatting is to again... page up and then page down again.
I'm wondering if anyone knows a way to force the screen to repaint/update so that my users will see the new formatting without having to page up/down.
I have a TextBox and a ComboBox. the TextBox shows the current date
VB : TextBox1.Value = Format(Date, "dd/mm/yyyy")
The ComboBox has a list index of years say from 1991 to 2030. Is it possible Change only the "yyyy" in the TextBox based on the changed value in ComboBox.
Say the textbox1 shows today 14/06/2014. now if we select 2016 in ComboBox1 the TextBox1 date should changed to 14/06/2016.
when i choose material from my combobox Options (cboTM), i wanted, only the textboxes regarding to the sheet material unlocked, and the others locked with the color of the form, and the same for the other options like worklabor and equipments. i could blocked for material with this code :
[Code] .....
The prob is, worklabor and equipments will be blocked too, and i dont know how to put correct info on the textboxes.
I have a drop down combo box with 4 options in (1, 2,3 and 4). Under this I have a label. What I want to do is have it so if I select, for example "2", then it says "D11 DJJ" In the label. The name of my CBO is CBOCarNum and the name of the label is LBLRegi
I would like to have a ComboBox on a worksheet (worksheet1) that is populated by a list on another worksheet (worksheet1). Each time I select something from the ComboBox, it would display text in a cell within worksheet1.
For example, the ComboBox would have "Cat", "Dog", "Cow". And when I select "Dog" from the ComboBox, it would display in a cell nearby "Woof".
Intend creating a calculator that shows me how much a certain hotel room costs at different times (seasons) of the year, for example I have a One Bedroom Budget Apartment (list of room types is extensive), I also have three seasons, low, S Hols and Xmas, so I have a sheet created and inserted drop down boxes for the RoomType, Season, and Number of days, I now have to insert a formula that looks for the three variables and inserts the cost (I already have this info on a worksheet)
TotalCost RoomTypes Season Days
[Code].....
Also I am using Excel 2003 so no combo box option (that I can find anyway)
I have ComboBox on a UserForm that is looking to a long list on a worksheet. A lot of the entries in this list start with a brand name instead of a more discriptive name. I really need to be able to find an entry with any key word (not just the first word) in this list.
I'm trying to get my textbox in my userform to get its value from my combobox's value with an offset and its been giving me some trouble. This is what I got so far and it works with no offset
Private Sub ComboBox1_Change() TextBox1.Value = ComboBox1.Value End Sub
And this is what I got so far for an offset which doesn't work
Private Sub ComboBox1_Change() For i = 1 To 43 TextBox1.Value = ComboBox1.Value.Offset(i, 1) Next End Sub
I have a combo box on my userform. The selection made in the combobox will eventually control a calculation. I would like to generate some code so that when the user makes a selection in the combo box, and fills in all the requied info on the form, they can click a button on the userform which will generate a new combobox on the worksheet which would contain the user selection, along with the array that populates the combobox on the userform.
I've created a macro that searches the active worksheet for a textboxvalue and copies all full and partial matches to a multicolumn listbox. However, I'd like to install some sort of filter that prevents registrations not containing the value in a combobox from making it into the listbox (so I'd actually like to search for registrations meeting two criteria, i.e. an advanced search). The macro I'm using is:
Private Sub Query_Change()
Dim vFound As Range Dim strFirstAddress As String
On Error Goto ErrorHandle
Set vFound = Cells.Find(What:=Query.value, After:=Cells(1, 10), _ LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False) If Not vFound Is Nothing Then strFirstAddress = vFound.Address
I've attached the workbook I'm working on, in case I haven't made myself sufficiently clear in the above.
I currently have a drop down menu in one of my worksheets, in which I have several different text values entered. What I would like to do is link each of those text values to a numerical value, which would be entered in to another cell. So if I select "Option A" from my drop down list, and Option A is equal to 200, I want "200" to show up in another cell. If I select "Option B" from my drop down list, and Option B is equal to 400, I want "400 to show up in that same other cell.
I have 3 sets of table in a sheet, namely, BK,DC & BDM. Each of the table to shows the result (extracted from other sheets) for 12months and the rating that correspondence with the result. There is also 2 combobox and a commandbutton at the bottom of the sheet. The combobox1 is to select the item (BK,DC or BDM) and combobox2 is to select the month. This is because i need to create something whereby, once the item and month is selected, then the user is able to click on the commandbutton and a small window will appear to indicate the year to date result (extracted from the tables)
For example, if the user select BK in combobox1 and April in combobox2, then when they click on the commandbutton, the following happens: -
1. Calculate the average percentage of the performance from Jan - Apr (I'm using the Excel formula for step 1 & 2) 2. Generate Rating 3. Populate the result in a small pop-up window which has the header as per what is selected in combobox1.
I have 4 categories A, B, C & D. These are in desending importance, means A is most important and D is least important. Now there could be many A, B, C & Ds listed in a column. The challange is if coulmn contains A anywhere then the result should be A. If A is absent, then search for B, if present anywhere then display the result as B. It doesn't matter how many times A or any character is listed in column. I am attaching a sheet for better explanation.
I have a worksheet that has 8 activex listboxes. Each listbox is tied to the sames list of values (identified as a named range). The named range is a list of countries. Each country should only be selected once, therefore, I would like the selected country(ies) to not show up as a choice when the user makes a selection from another listbox. If this is too hard, maybe we can get a msgbx to appear anytime the users tries to select a country that has already been selected.
I need to populate two combo boxes from excel sheet, the data will be like below:
Column A Column B A 1 A 2 A 3 A 4 A 5 B 100 B 101 B 102
So from the above data, one combo box should hold unique values A & B.
On selecting a value from the 1st combo box A or B, respective values should be populated in 2nd combo box.
So the data should be like below:
If A is selected in the 1st combo box, then 2nd combo box should only show the values 1,2,3,4 & 5. If B is selected in the 1st combo box, then 2nd combo box should only show the values 100,101 & 102.
Friends I need it in a macro and one important point is, this is dynamic and it is not static and the data can be more.
I have two different modules in my automation - to be specific one module to convert file from LH to RH and another module to do the reverse - convert RH to LH.
I have put up a radio button choice for the user and based on which radio button is selected would like to run that particular module.
Below is my code. It always throws an error "expected variable or function not module"
VB: Option Explicit Public Sub MAIN() If ThisWorkbook.Worksheets("FRONT").OptionButton1.Value = True Then Call LH_to_RH
[Code]....
I am following the correct procedure to call modules. A few minutes of search said the modules have to be public sub routines