Microsoft KB Archive/325010

= BUG: You receive a runtime error when you call the ASPUtilLib.GetStyles method =

Article ID: 325010

Article Last Modified on 8/13/2007

-

APPLIES TO


 * Microsoft Solution for Internet Business 2.5

-



This article was previously published under Q325010



SYMPTOMS
When you work with the ASPUtilLib.GetDictionary object in Microsoft Visual Basic Script (VBS), and you do not use the Set keyword in front of the object variable you are defining, you may receive a runtime error.



CAUSE
This problem occurs when you set the value of a variable to the object type without the Set keyword.



RESOLUTION
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.



WORKAROUND
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and the tools that are used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, visit the following Microsoft Web site:

https://solutionfinder.microsoft.com/

For additional information about the support options available from Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;[LN;CNTACTMS]

To work around this problem, use the following VBA code sample that uses the Set keyword to define the object variable that is returned from the ASPUtilLib.GetDictionary object: 'ASPUILIB.ASP

Function GetStyles Set dictStyles = m_ASPUtilLib.GetDictionary dictStyles.StandardTextBox = &quot;size='&quot; & STANDARD_TEXTBOX_SIZE_NUMBER & _ &quot;'&quot; dictStyles.StandardPasswordBox = &quot;size='&quot; & _ STANDARD_TEXTBOX_SIZE_NUMBER & &quot;'&quot; Set GetStyles = dictStyles End Function

'ASPUTILLIB.ASP

Public Function GetDictionary Set GetDictionary = Server.CreateObject(&quot;Commerce.Dictionary&quot;) End Function

Keywords: kbfix kbbug KB325010

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.