ComboBox Selection/Choice Looses Format
Oct 16, 2006When i select 10% in the combo box, it changes to decimal which is 0.1
How do i change it to a whole number? eg. 0.9 to 90%?
When i select 10% in the combo box, it changes to decimal which is 0.1
How do i change it to a whole number? eg. 0.9 to 90%?
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 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.
I am wanting to use Excel to perform a web query into an online database our company uses. One of the columns I am wanting to import contains numbers that are 20 digits long & they begin with 4 zero's. The problem is that when Excel imports the query, if I fprmat the cells & preserve the formatting, it cuts off the first 4 zero's & replaces the last number with a zero. Basically, it looks as if it is only importing 15 numbers. Is there a way around this ; is there a way to force Excel to import all 20 numbers? If I don't format the cells, it imports in the following format - 4.20017E+15
View 4 Replies View RelatedI 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.
View 3 Replies View RelatedI'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)
View 9 Replies View RelatedI 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
View 2 Replies View RelatedI'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.
View 5 Replies View RelatedI 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".
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 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.
View 7 Replies View RelatedI have 2 work sheet
First sheet is "Department "
11 Departments
Second sheet is "Designation "
20 Designation
i have generated VBA form
but..now in this form i want to create 2 input options..
1)select department (capture all depts. from Department sheet. if i select HR Department then in 2nd option all HR Designation should be copied
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 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?
View 6 Replies View RelatedI 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.
View 3 Replies View Related3 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
Worksheets("jan").Range(2, 1).Select
End If
Exit For
Next i
End Sub
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
[url]
I created a UserForm then linked ComboBox1 to range A2:A, TextBox2 to range E2:E, and ComboBox3 to range M2:M of the same worksheet, named Sheet3. The row contents in Column A, Column E, and Column M are associated. Therefore, when the UserForm is active I want to be able to select a row from Column A in ComboBox1 and have the UserForm pull the contents from the same row of Column E into TextBox2, and Column M into ComboBox3. Here is what I have so far, but its not quite doing it.
Code:
Private Sub UserForm_Initialize()
Sheets("Sheet3").Activate
Dim ColARange As Range
[Code].....
I have a table, headers "FirstName" and "SurName".
Further a Userform with 2 Comboboxes "FirstName" and "SurName"
I'd like to choose the FirstName (say Jack) in the "FirstName" combobox, and based on that get the choice of the Surnames of all my Jacks in the "SurName" combobox.
Actually my sheet has much more fields and comboboxes, but i think my problem is just that I do not find a way to populate them dynamically.
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.
Attached File : teste1.zip
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'm using Excel 2007.
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 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.
View 4 Replies View RelatedI want to make a lesson table which distribute the names to lesson choice priority.
You can see detail and explanation at attached file. LessonChoice.xlsx
I have a list of departments on "Employee Data" sheet on column A and list of staff names on column B. It looks like this:
DEPT FULL NAME
pdi Bob Tan
pdi John Christian
aftersales_bikes Jim Yeo
I have 24 departments in total and 300 over employees in mt employee data sheet.
On "Jan - June 2014 Training Hours" sheet, when employees attend training courses, I will have to update what courses they went for, no of hours etc.
My problem is:
I would like to select the department (using combo box for the auto complete function) and when department is selected, the staffs in that particular department will show. I have attached the file for your understanding. Currently, I am using data validation with indirect function in that file but would like to switch to combo box.
I have a userform used to input data. I contains textboxes and comboboxes and a command button that is clicked on to record the data onto a worksheet.
What I am looking for is a combobox that is linked to a list of clients (column A of worksheet "Clients").
I would like the user to click on the combobox and select a client name. If the client is new then I would like the user to be able to type in the new name and, then have that name available in the "Clients" names that appear the next time the user clients on the combobox.
I have it almost working, but not quite.
I have a defined name on the "Clients" worksheet as follows:
[Code]....
I have a cell range with the following data:
A 1 2 3
B 4 5 6
C 7 8 9
On another worksheet, I have multiple comboboxes from the Controls toolbar in a column, each having possible selections are based on the data in a column 1 above (ie. A,B,C). When a selection is made in any of these comboboxes, cells to the right of the combobox get populated with the corresponding remaining data from the above cell range - ie. when A is selected, 1,2,3 appears to the right of the combobox, when B is selected, 4,5,6, etc. I want to be able to make selections from within combo boxes, not only by using the combo box dropdown and select mechanism, but also, if possible, by pasting a cell range whose data matches one of the existing selections available in the combobox definition. In other words, if I have a single column cell range from somewhere with the following data in 1 row:...............
I am programming some kind of database in excel and using comboboxes as drop down lists to enter some of the information in the DB. My problem is that when the file is saved, closed and then opened again, all of the comboboxes have lost their selection. I think that using the ControlSource might help but for some reason I can't find the proper syntaxe to make it works. Actually I am getting a Run time error 438: This object doesn't support this property or method.
I have included the relevant portion of my code below. Is the ControlSource property going to solve my problem? If so, what is the syntax I must use? If not, what can I do to make sure that my ComboBoxes are going to keep their selection?
ActiveSheet. OLEObjects.Add(ClassType:="Forms. ComboBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=hori_offset - 220, Top:=vert_offset + 78, _
Width:=180, Height:=24.75).Select
With ActiveSheet.OLEObjects("ComboBox1").Object
.Font.Size = 14
.Font.Bold = True
.Style = fmStyleDropDownList 'Use drop-down list
.BoundColumn = 0 'Combo box values are ListIndex values
End With
With ActiveSheet.Shapes("ComboBox1")
.OLEFormat.Object.ControlSource = "Q1"
.OLEFormat.Object.ListFillRange = "M1:M8"
End With
There are two Combo boxes in the form. ComboBox1 is being populated from a named range - "ParticipantName". (Located in Sheet1!C2:C500) ComboBox2 has been populated with "No" and "Yes" with additem in Form1 Initialize.
There are 3 (Three) Command Buttons - "Save", "Cancel" and "Close".
"Cancel" shall clear data in both Combo Boxes. It is done.
"Close" shall unload the Form. It is also done.
My problem is with the "Save" button. The user will select a name in the ComboBox1 and Select "Yes" or "No" in ComboBox2. Then if the user press "Save"; only the selected data of ComboBox2 will be written in the 26th Column (Column "Z") of Sheet1 in respective Row of the name selected in the ComboBox1.