Updating the key in a dictionary object

Results 1 to 2 of 2

Thread: Updating the key in a dictionary object

  1. #1
    Join Date
    Dec 1969

    Default Updating the key in a dictionary object

    I am trying to change the key in a dictionary object....I have a store and in the cart I have a input box that the user and change quanitity. the user then hit an update button that SHOULD update this key. I cannot seem to get this to work. Any ideas??<BR>

  2. #2
    Join Date
    Dec 1969

    Default clear as a bell in the manual...

    From the online docs:<BR><BR>***********************<BR>Key Property<BR>Sets a key in a Dictionary object. <BR><BR>object.Key(key) = newkey<BR><BR>Arguments<BR>object -- Required. Always the name of a Dictionary object.<BR><BR>key -- Required. Key value being changed.<BR><BR>newkey -- Required. New value that replaces the specified key.<BR><BR>Remarks<BR>If key is not found when changing a key, a run-time error will occur. <BR><BR>The following example illustrates the use of the Key property: <BR><BR>Function DicDemo<BR> &nbsp; Dim d &#039 Create some variables.<BR> &nbsp; Set d = CreateObject("Scripting.Dictionary")<BR> &nbsp; d.Add "a", "Athens" &#039 Add some keys and items.<BR> &nbsp; d.Add "b", "Belgrade"<BR> &nbsp; d.Add "c", "Cairo"<BR> &nbsp; d.Key("c") = "d" &#039 Set key for "c" to "d".<BR> &nbsp; DicDemo = d.Item("d") &#039 Return associate item.<BR>End Function<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts