Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate and refresh
Hi Guys,
I know nothing about excel macros so I am looking for good help. I want to know how to refresh my drop down boxes (data validation, not combo boxes) in a excel spreadsheet whenever the workbook is opened. ALso, I want to populate 5 cells on the dropdown worksheet with data from another worksheet depending on what i choose in my drop down box. Any help and examples would be greatly appreciated. I am used to Access and I can't seem to figure out how create events, functions, subs, etc. -- Thanks in advance, Matt (access 2000) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate and refresh
Refresh the drop downs with what? Where is the list you want in you drop
downs coming from? Once you have the drop downs populated how many different alternatives could there be in the drop downs. That is how many possible answers will the code have to react to. "MaBell" wrote: Hi Guys, I know nothing about excel macros so I am looking for good help. I want to know how to refresh my drop down boxes (data validation, not combo boxes) in a excel spreadsheet whenever the workbook is opened. ALso, I want to populate 5 cells on the dropdown worksheet with data from another worksheet depending on what i choose in my drop down box. Any help and examples would be greatly appreciated. I am used to Access and I can't seem to figure out how create events, functions, subs, etc. -- Thanks in advance, Matt (access 2000) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate and refresh
I want the drop down box to be empty before the user clicks on it. I don;t
want the box to display the last selection next time the workbook is opened. Second question: I know access VBA but I can't seem to figure out how to initiate any excel change events. For example. A user selects dogs from the drop down list. I want the cells next to the drop down list to list the names of dogs from worksheet2. Is that possible? "Jim Thomlinson" wrote: Refresh the drop downs with what? Where is the list you want in you drop downs coming from? Once you have the drop downs populated how many different alternatives could there be in the drop downs. That is how many possible answers will the code have to react to. "MaBell" wrote: Hi Guys, I know nothing about excel macros so I am looking for good help. I want to know how to refresh my drop down boxes (data validation, not combo boxes) in a excel spreadsheet whenever the workbook is opened. ALso, I want to populate 5 cells on the dropdown worksheet with data from another worksheet depending on what i choose in my drop down box. Any help and examples would be greatly appreciated. I am used to Access and I can't seem to figure out how create events, functions, subs, etc. -- Thanks in advance, Matt (access 2000) |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate and refresh
In the VBA window for select the sheet where the change is being made
Here is the code: Part 1 Private Sub Worksheet_Activate() sheets("Sheet1").range("A1").value = "" End Sub Part 2 Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then select case target.value case "Dog" target.offset(1,0).value = "Cat" case "Cat" target.offset(1,0).value = "Mouse" case "Mouse" target.offset(1,0).value = "Cheese" End If End Sub You can get the list of events by choosing Worksheet Where is says general in the VBA Window. The list of events is in the Drop down to the right of General. You should include option explicit at the beginning of your code to force explicit varaible declartions. HTH "MaBell" wrote: I want the drop down box to be empty before the user clicks on it. I don;t want the box to display the last selection next time the workbook is opened. Second question: I know access VBA but I can't seem to figure out how to initiate any excel change events. For example. A user selects dogs from the drop down list. I want the cells next to the drop down list to list the names of dogs from worksheet2. Is that possible? "Jim Thomlinson" wrote: Refresh the drop downs with what? Where is the list you want in you drop downs coming from? Once you have the drop downs populated how many different alternatives could there be in the drop downs. That is how many possible answers will the code have to react to. "MaBell" wrote: Hi Guys, I know nothing about excel macros so I am looking for good help. I want to know how to refresh my drop down boxes (data validation, not combo boxes) in a excel spreadsheet whenever the workbook is opened. ALso, I want to populate 5 cells on the dropdown worksheet with data from another worksheet depending on what i choose in my drop down box. Any help and examples would be greatly appreciated. I am used to Access and I can't seem to figure out how create events, functions, subs, etc. -- Thanks in advance, Matt (access 2000) |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populate and refresh
Sorry the code is incomplete... I didn't finish the select statement.
You should include case default msgbox "Not Found" end select Sorry... "Jim Thomlinson" wrote: In the VBA window for select the sheet where the change is being made Here is the code: Part 1 Private Sub Worksheet_Activate() sheets("Sheet1").range("A1").value = "" End Sub Part 2 Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then select case target.value case "Dog" target.offset(1,0).value = "Cat" case "Cat" target.offset(1,0).value = "Mouse" case "Mouse" target.offset(1,0).value = "Cheese" End If End Sub You can get the list of events by choosing Worksheet Where is says general in the VBA Window. The list of events is in the Drop down to the right of General. You should include option explicit at the beginning of your code to force explicit varaible declartions. HTH "MaBell" wrote: I want the drop down box to be empty before the user clicks on it. I don;t want the box to display the last selection next time the workbook is opened. Second question: I know access VBA but I can't seem to figure out how to initiate any excel change events. For example. A user selects dogs from the drop down list. I want the cells next to the drop down list to list the names of dogs from worksheet2. Is that possible? "Jim Thomlinson" wrote: Refresh the drop downs with what? Where is the list you want in you drop downs coming from? Once you have the drop downs populated how many different alternatives could there be in the drop downs. That is how many possible answers will the code have to react to. "MaBell" wrote: Hi Guys, I know nothing about excel macros so I am looking for good help. I want to know how to refresh my drop down boxes (data validation, not combo boxes) in a excel spreadsheet whenever the workbook is opened. ALso, I want to populate 5 cells on the dropdown worksheet with data from another worksheet depending on what i choose in my drop down box. Any help and examples would be greatly appreciated. I am used to Access and I can't seem to figure out how create events, functions, subs, etc. -- Thanks in advance, Matt (access 2000) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Excel functions formula and auto refresh refresh | Excel Worksheet Functions | |||
Create refresh button in worksheet to refresh Pivot Table Data | Excel Worksheet Functions | |||
Timing of automatic query refresh and macro pivot table refresh | Excel Programming | |||
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH | Excel Programming | |||
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) | Excel Programming |