Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 5th, 2004, 03:10 PM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default HELP WITH DROPDOWN LIST

I am working on customizing a workbook to allow users to 'view' the results of their data entry on a series of summary worksheets in the same workbook. I accomplished most of the customization by simply creating buttons and assigned macros to the them to direct the user to the summary sheets. This is working just fine, however, I would like to create a Dropdown list, to include different branches of the organization, and allow users to just view the summaries for that particular branch.

Could someone help me out? I want to be able to create the Dropdown list, allow the user to select an item from the list, use that as input to go to the sheet where the item (branch) summary is stored.

I tried creating a Form ComboBox and referencing a range that contains the branches, but I do not know how to use the selected item from the Combobox to direct the user to the view sheet.

Help!!!




Enrique D. Navas
SPARCC
Technical Services Consultant
Stark County Educational Service Center
2100 38th Street NW
Canton, OH 44709
Tel. (330) 492-8136 x-373

Enrique D. Navas
SPARCC
Technical Services Consultant
Stark County Educational Service Center
2100 38th Street NW
Canton, OH 44709
Tel. (330) 492-8136 x-373
 
Old April 6th, 2004, 02:08 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 168
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I think it's better way to use Dropdown list from Control Toolbox.

After you have placed Dropdown list to your worksheet, write the code below

Private Sub ComboBox1_GotFocus()
    Dim Page As Worksheet
    ComboBox1.Clear
    For Each Page In Sheets
        ComboBox1.AddItem Page.Name
    Next
End Sub

Private Sub ComboBox1_Change()
    On Error Resume Next
    Sheets(ComboBox1.Text).Activate
End Sub

I hope this will help you
-vemaju






Similar Threads
Thread Thread Starter Forum Replies Last Post
gridview with a dropdown list paullam71 ASP.NET 2.0 Basics 0 July 22nd, 2007 09:43 AM
Dropdown list maha .NET Framework 2.0 7 April 28th, 2007 12:32 AM
fill dropdown list with items when parent list isaac_cm Pro PHP 1 July 10th, 2006 05:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.