LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default List could not be retrieved

I'm doing something like a dependent list in reverse: I wanna fill in the
country automatically based on the state the user has input.
I've written a function to be called at the formula bar (I've placed this
code in the general module).
However, it always gives me #VALUE! as result. Upon stepping through it, I
found out that the code always breaks at the List assignment line (indicated
by ). Somehow Excel refuses to assign List to a dynamic named range I've
defined in the workbook.
Would appreciate any suggestions. Thanks heaps!

' Choose the country based on state
Public Function Country_Change(State As Range) As String
Dim List As Range

If (Not CStr(State.Value) = "") Then
Application.EnableEvents = False
' Choose the right list
List = Application.Names.Item("CountryList").RefersToRang e

Country_Change = MyVLookUp(State, List, 1)
Application.EnableEvents = True
End If
End Function
______
cLiffordiL


 
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
To show the sunbtotal in retrieved rows pol Excel Discussion (Misc queries) 8 October 16th 08 04:16 PM
Using filename retrieved from GetOpenFilename Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 2 September 12th 08 07:47 PM
Can the author of an .XLS be found and retrieved ? HTTC guy Excel Discussion (Misc queries) 1 July 14th 06 05:01 PM
vlookup with more than number to be retrieved martelie Excel Worksheet Functions 3 October 14th 05 12:50 PM
vlookup with more than number to be retrieved martelie Excel Worksheet Functions 1 October 8th 05 07:33 AM


All times are GMT +1. The time now is 11:50 PM.

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

About Us

"It's about Microsoft Excel"