Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to use a command button in excel?
What button type[listbox or command?] and what script do I attach to a
button I've called 'Select a Workgroup' which, when clicked on, will provide a drop down box with all workgroup names. I would like to be able to click on a name and have the data within the report reflect that of the workgroup selected. I'm trying to recreate a macro button in Excel as used in Lotus - example below : Sub Click(Source As Buttoncontrol) [/w].MacroRun End Sub *where /w represents "workgroup" Does Excel have the same premise as Lotus whereby a "workgrouplist" and "workgrouppick" need to be named in a range as well as the following formula{CHOOSE-ITEM workgrouplist;workgrouppick;"Select a Workgroup";"Workgroup Selection"}{calc}. Is there a web site that I can refer to for assistance? Thank you! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to use a command button in excel?
Gail
I'm not sure I follow everything you said. I get the idea that you want to have a list presented (displayed) to the user for the purpose of having the user select (click on) one item from the list. Then you want Excel to automatically transfer/copy/bring some data, that is pertinent to the selection, from a source location to some other destination location. Is that right? Assuming the above is correct, you can do this with Data Validation and a number of VLookup formulas. Maybe. The "Maybe" is dependent on what your data layout is. If VLookup formulas won't do it, VBA will. You would use Data Validation (look it up in Help) in one cell. When the user selects that cell and clicks on the down-arrow to the right of that cell, a drop-down list of all the workgroup names would be displayed. When the user clicks on one of the names, that name would be displayed in that cell. Everything else would then be done automatically. I assume that you have the data you want copied located in a table structure with the workgroup names in the first column of this table. If this is so, you can place VLookup formulas in each of the destination cells. That way, each such formula cell will display the specific data from the table that is pertinent to the selection made. Please post back if this sounds like it might work for you. Provide more details about what you have and what you want to happen. HTH Otto "GailK" wrote in message ... What button type[listbox or command?] and what script do I attach to a button I've called 'Select a Workgroup' which, when clicked on, will provide a drop down box with all workgroup names. I would like to be able to click on a name and have the data within the report reflect that of the workgroup selected. I'm trying to recreate a macro button in Excel as used in Lotus - example below : Sub Click(Source As Buttoncontrol) [/w].MacroRun End Sub *where /w represents "workgroup" Does Excel have the same premise as Lotus whereby a "workgrouplist" and "workgrouppick" need to be named in a range as well as the following formula{CHOOSE-ITEM workgrouplist;workgrouppick;"Select a Workgroup";"Workgroup Selection"}{calc}. Is there a web site that I can refer to for assistance? Thank you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Command Button Excel 2007 | Excel Discussion (Misc queries) | |||
Command Button in Excel | Excel Programming | |||
Excel Add-In with Command Button Controls | Excel Programming | |||
Can I run a macro from a command button in Excel? | Excel Programming | |||
excel, vba, command button | Excel Programming |