Disable TextBoxes Based On ComboBox Choice

Nov 22, 2006

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


ADVERTISEMENT

Disable TextBoxes And Input Correct Data Based On ComboBox Choice

Mar 24, 2014

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

View 5 Replies View Related

Result Based On ComboBox Choice

Jul 25, 2006

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)

View 9 Replies View Related

Run Macro Based Combobox Choice

Jul 13, 2007

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.

View 5 Replies View Related

Go To Sheet Based On ComboBox Choice

Aug 22, 2007

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!

View 6 Replies View Related

Filter & Copy Based On ComboBox Choice

Nov 14, 2006

I 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

View 4 Replies View Related

Go To Range & Sheet Based On Combobox Choice

Feb 2, 2008

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

Worksheets("jan").Range(2, 1).Select

End If

Exit For
Next i

End Sub

View 9 Replies View Related

Filter Choice Selection Based On Combobox Values?

Apr 24, 2014

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()...

View 4 Replies View Related

Select Worksheet Based On ComboBox Control Choice

Sep 1, 2006

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.....................

View 9 Replies View Related

Transfer TextBox Value To Cell Based On ComboBox Choice

Aug 26, 2007

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]

View 4 Replies View Related

Change Year Value In Dd/mm/yyyy Format Based On Combobox Choice

Jun 14, 2014

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.

View 4 Replies View Related

Excel 2010 :: Hide / Show Textboxes And Labels Based On Combobox Selection?

Jul 8, 2014

I have created a UserForm that has a ComboBox and depending on the number selected I want it to show that number of Labels/TextBoxes...

So if I select "0" nothing is shown, if I select "1" one set of Labels/TextBoxes is shown, select "2" and two sets of Labels/TextBoxes are shown... but also if I have selected "2" and then select "1" I want the second set to be hidden again...


Also I know I should have renamed the Label/TexBoxes to make it easer but I was adding things and making it up as I went along...

I'm using Excel 2010 on windows 7.

Code:
Sub UnHide_NewRoutings()
If (Engineering.ComboBox2.value) = "0" Then
Engineering.Label4.Visible = False
Engineering.TextBox5.Visible = False
Engineering.Label9.Visible = False
Engineering.TextBox9.Visible = False

[Code] ..........

View 3 Replies View Related

Enable & Disable Worksheet Controls Based On ComboBox Value

Mar 5, 2008

I'm currently building an Excel database. This database has a few comboboxes and checkboxes that are tied to each other. If I select the combobox option of "Years", the "Quarters" combobox must be greyed out. In addition depending on which option is chosen, the relevant check boxes must be enabeled or disabled. I've written some code which runs fine, until I try and activate another macro button or if I add and rename a sheet(which is not linked to anything). What should I do? Here is a sample of my code. I have a feeling it's really obviouse but I cant see it..

Private Sub ComboBox2_Change()
If Sheets("InputSheet").ComboBox2 = "Years" Then
Sheets("InputSheet").ComboBox3.Value = ""
Sheets("InputSheet").ComboBox3.Enabled = False
Sheets("InputSheet").CheckBox6.Enabled = True
Sheets("InputSheet").CheckBox7.Enabled = True
Sheets("InputSheet").CheckBox8.Enabled = True
Sheets("InputSheet").CheckBox9.Enabled = True
Sheets("InputSheet").CheckBox10.Enabled = True
Sheets("InputSheet").CheckBox11.Enabled = True
Sheets("InputSheet").CheckBox12.Enabled = True
Sheets("InputSheet").CheckBox13.Enabled = True
Sheets("InputSheet").CheckBox14.Enabled = True
End If...................

View 3 Replies View Related

Disable A Command Button If 4 Textboxes Are Empty

Jun 11, 2009

I am trying to disable a command button if 4 textboxes are empty. I can make it work if one of the textboxes are empty but not all of them. this is what i have so far.

Private Sub TXT3_Change()
If TXT3.Value = "" Or TXT4.Value = "" Or TXT5 = "" Or TXT6 = "" Then
CommandButton13.Enabled = False
End If
If TXT3.Value "" Then
CommandButton13.Enabled = True
End If
End Sub

View 9 Replies View Related

Link ComboBox Choice To Label

Nov 14, 2006

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

View 2 Replies View Related

Display Corresponding Combobox Choice In Cell

Jul 18, 2007

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".

View 8 Replies View Related

Combobox To Create Textboxes

May 5, 2008

I have a combobox in which are the numbers 1 thru 10. I'd like for the user to be able to choose a number and then that number of textboxes appear below. I have the textboxes invisible on the userform and I'm trying to work out to code to show them when the number is selected (by command button). Heres my code, it only seems to show my first set of textboxes no matter what number is in the combo box. Can someone please help me make this work? And is there a more concise way to do this?

i changed the names of the textboxes because i built the form before i thought about the code and frankly there are too many all together for me to remember their names

Private Sub CommandButton7_Click() 'Ok button page 3
Dim i As Integer
Dim j As Integer

For i = 1 To 10
Select Case Val(ComboBox21.Text) = i
Case 1

View 9 Replies View Related

ComboBox Selection/Choice Looses Format

Oct 16, 2006

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%?

View 6 Replies View Related

Find Part ComboBox Choice In Range

Oct 28, 2006

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 Related

Fill TextBox With Offset From ComboBox Choice

Nov 20, 2006

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

View 6 Replies View Related

Return Associated Data To UserForm For ComboBox Choice

Dec 11, 2007

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.

View 3 Replies View Related

Populate Several TextBoxes From A ComboBox Selection

Mar 28, 2009

I need to link the textboxes of a form to the appropriate cells associated to the selection made by a combobox. And in the process I need to be able to Edit one of those Textboxes on the fly while the rest will be locked to the user.

Not sure if the editing of the Notes section can be real time of if it must be updated through a button.

View 10 Replies View Related

User Form That Has A Combobox And 5 Textboxes

Jul 17, 2008

I have a simple user form that has a combobox and 5 textboxes.

The combobox gets its row source from all the data in column A of the worksheet and the 5 textboxes will have decimal number inputted.

when commandbutton 1 is clicked I would like exel to find the value in the combobox on the worksheet and input the 5 textboxes in colums B-F. I'm sure it has something to do with "offset", but I can't quite figure it out.

View 9 Replies View Related

Fill Textboxes In UserForm From ComboBox

Jun 4, 2006

I've been trying for hours to populate a textbox on a userform based on a combo box. I'm including a zip of my workbook to see. (don't laugh to hard at my code, like I said I'm green...:) When you select a mix design in my form I want the next six combo boxes to populate. The way I have it now is based on one of the many examples found here, (none of which have worked for me so far, but this one said "the simplest way to do this is......") And I get an error 425 - "Object not found". I've done searches based on the error but haven't found an answer.

View 4 Replies View Related

Getting Results From 4 Combobox Selection To Textboxes In Userform

Apr 19, 2013

My data resides in a workbook in sheet2 and sheet3. I have 4 comboboxs refering to different columns in sheet2 and sheet3. Basically when the user selects all the four comboboxs, the criteria should be satisfied and the results in terms of rows matching those values should be shown in the textboxs below.

Each three of the textboxs refers to individual columns in sheet2 and sheet3. All I want to do is simple search criteria on both sheet 2 and sheet3 and put the results in textboxs.

I have populated my comboboxs but dont know the macro to do the search results .

my userform,which has 4 comboboxs

combobox1 = sheet2 column C
combobox2 = sheet2 column BL
combobox3 = sheet3 column K
combobox1 = sheet3 column F

The results which satisfy the above 4 criteria should come from ,when user presses POP UP DETAILS BUTTON,

textbox1= sheet3 column C
textbox2= sheet3 column N
textbox3= sheet2 column T

Actually I have many records which satisfy the above 4 criteria, dont know how to display them whether in textbox or any another method.

View 3 Replies View Related

Selected Item In Combobox, Updates Textboxes

Mar 5, 2007

Its a phone number directory. the data is retrived based on nickname. when a nickname is selected, its phone number and details will be updated in the textboxes ... example: tony (in A2) is selected from the combobox, his phone number (in B2) and details (in C2) are updated in the textboxes.

View 2 Replies View Related

Fill ListBox With TextBox Matches While Excluding Those Matching ComboBox Choice

Jul 11, 2009

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.

View 3 Replies View Related

ComboBox Code For Enable & Disable

Oct 13, 2008

I started to write mini codes but still much to learn.

Private Sub ComboBox3_Change()
If Range("A1") = "TRUE" Then
ComboBox3.Enabled = 1
ElseIf Range("A1") = "FALSE" Then
ComboBox3.Disabled = 1
End If

End Sub

View 9 Replies View Related

Disable Manual Entry In Combobox

Mar 29, 2007

I would like to use a combobox and I want to force the user to selected one item from the list, and not to be able to type anything in it.

My other solution would be to use a listbox but I like the combobox design better...

I found this code in a MSDN Forum but somehow, it does not seem to work.
Maybe it is because I do not know what to do with a "public class", or my Excel 97 does not support this.
I tried pasting the "private sub" in a sheet code (where my combobox is), but it did not work.

Public Class Form1
Private Sub ComboBox1_KeyPress(ByVal sender As System.Object, _

ByVal e As System.Windows.Forms.KeyPressEventArgs) _

Handles ComboBox1.KeyPress

e.Handled = True

End Sub

Is this code actually working under excel 97 and if so, where do I have to put it?

View 3 Replies View Related

How To Disable Combobox On Radio Button Click In Macros

May 19, 2009

how to disable combobox on radio button click in excel macros'

I have 2 radio buttons: optionbutton1 and optionbutton2 and two comboboxes: Combobox1 and Combobox2.If i select 1st radio button 2nd combobox should be disabled.Vise versa

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved