Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an area on my spreadsheet where users input their data and then get an output near the bottom of the page. I want to make the navigation of the input part as easy as possible as there will be people who are not very computer literate using this spreadsheet
The problem that I am having is being able to tab into a combo box. I found code from someone else that helps me tab through the form once I have gotten inside a combo box, but I don't know how to get into the first combo box. For instance, I have a combo box (combobox6) sitting on top of cell D9. I want to be able to tab from cell L8 directly into the combo box. Right now I tab from cell L8 to cell D9. Once inside of combobox6, I am able to tab through the rest of the form the way that I want If anyone out there can help me find a way to tab into combobox6 from a cell I would appreciate it Rya |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ryan,
I've spent some time the last couple days trying to figure something out for you. I'm hardly an expert, but I've looked at all the methods and properties for a dropdown box from the Forms toolbar and I can't figure out how to tab into one. If you were using comboxes from the Controls toolbar it seems to be as simple as "Combobox1.Activate." Maybe you should consider switching? (I take it you can't use my earlier suggestion of using Data Validation in worksheet cells). Just wanted to let you know I've been trying... Doug "Ryan" wrote in message ... I have an area on my spreadsheet where users input their data and then get an output near the bottom of the page. I want to make the navigation of the input part as easy as possible as there will be people who are not very computer literate using this spreadsheet. The problem that I am having is being able to tab into a combo box. I found code from someone else that helps me tab through the form once I have gotten inside a combo box, but I don't know how to get into the first combo box. For instance, I have a combo box (combobox6) sitting on top of cell D9. I want to be able to tab from cell L8 directly into the combo box. Right now I tab from cell L8 to cell D9. Once inside of combobox6, I am able to tab through the rest of the form the way that I want. If anyone out there can help me find a way to tab into combobox6 from a cell I would appreciate it. Ryan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the object is called ComboBox6 then it most probably is
a control, so add this code to the code pane for the worksheet Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static lastAddress As String If lastAddress = "$L$8" Then ComboBox6.Activate End If lastAddress = Target.Address End Sub This code traps any movement out of the cell L8 Kevin Beckham -----Original Message----- Ryan, I've spent some time the last couple days trying to figure something out for you. I'm hardly an expert, but I've looked at all the methods and properties for a dropdown box from the Forms toolbar and I can't figure out how to tab into one. If you were using comboxes from the Controls toolbar it seems to be as simple as "Combobox1.Activate." Maybe you should consider switching? (I take it you can't use my earlier suggestion of using Data Validation in worksheet cells). Just wanted to let you know I've been trying... Doug "Ryan" wrote in message ... I have an area on my spreadsheet where users input their data and then get an output near the bottom of the page. I want to make the navigation of the input part as easy as possible as there will be people who are not very computer literate using this spreadsheet. The problem that I am having is being able to tab into a combo box. I found code from someone else that helps me tab through the form once I have gotten inside a combo box, but I don't know how to get into the first combo box. For instance, I have a combo box (combobox6) sitting on top of cell D9. I want to be able to tab from cell L8 directly into the combo box. Right now I tab from cell L8 to cell D9. Once inside of combobox6, I am able to tab through the rest of the form the way that I want. If anyone out there can help me find a way to tab into combobox6 from a cell I would appreciate it. Ryan . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Doug
I just reread your data validation suggestion. I am not quite sure how to accomplish this. If you could help me that would be great At this point, I have pretty much given up on having the comboboxes automatically drop down. I just want to figure out a way to tab from a cell into one. If I can accomplish that then I will be satisfied Ryan |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ryan,
Look up Data Validation in Excel Help (not VBA Help) and in Google Groups for more info. Data Validation is found in the Excel Data menu. Validation applies directly to spreadsheet cells, no controls or programming required. It enables you to specify a list of allowed entries in a given cell. You can have unique validation for each cell or apply the same validation list across several cells, rows, etc. The list can be specified in the Data Validation dialog box or, probably better, you can specify a range on the worksheet that contains your list. You can specify a range in another sheet or workbook, but you have to use a named range (Insert - Name-Define). From an earlier post I had assumed that the comboboxes you're trying to use are from the Forms Toolbar. If you use the ones from the Control Toolbox, you can use the Activate method. In order for it to be automatic, you'd use a worksheet event, as Kevin discussed. Worksheet events are entered in the worksheet code module in the VB Editor. To view the worksheet code module, right-click the sheet tab and choose "View Code." In the dropdown box at the top left of the code window choose "WorkSheet". In the dropdown box at the top right, you will then see all the worksheet events, including the SelectionChange event. The following code is a SelectionChange event that you can paste into this window. It will put the cursor in ComboBox1 (from the Control Toolbox) when you tab to or click cell "L8": (I used ActiveCell instead of Target so it won't fire if the user selects multiple cells that include L8.) Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(ActiveCell, Range("L8")) Is Nothing Then ComboBox1.Activate End If End Sub hth, Doug "Ryan" wrote in message ... Doug, I just reread your data validation suggestion. I am not quite sure how to accomplish this. If you could help me that would be great. At this point, I have pretty much given up on having the comboboxes automatically drop down. I just want to figure out a way to tab from a cell into one. If I can accomplish that then I will be satisfied! Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
COMBOBOX | New Users to Excel | |||
COMBOBOX | Excel Programming | |||
Combobox | Excel Programming | |||
COMBOBOX | Excel Programming |