Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Excel functions formula and auto refresh refresh Pauline Cheong Excel Worksheet Functions 3 February 16th 09 01:23 AM
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) Anant[_2_] Excel Programming 1 August 6th 03 04:22 AM


All times are GMT +1. The time now is 04:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"