Solved

Reading and Writting to a REG_MULTI_SZ Value

Posted on 2004-08-01
1
895 Views
Last Modified: 2012-08-14
I'm trying to find a way of reading and writting to a REG_MULTI_SZ Value in a simple way through CreateObject("WScript.Shell").

Thanks in advance,
Kalaka
0
Comment
Question by:kalaka
1 Comment
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 130 total points
ID: 11690298
At the below, you'll see "Note   The REG_MULTI_SZ type is not supported for the RegWrite method" so it's not possible through the scripting object.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsMthRegWrite.asp


Here's an example of reading REG_MULTI_SZ values. The returned data is an array.

Private Sub Form_Load()
    Dim objWShell As Object, strTest As Variant, intLoop As Integer
    Set objWShell = CreateObject("WScript.Shell")
    strTest = objWShell.RegRead("HKEY_LOCAL_MACHINE\Software\Test\Key")
    If IsArray(strTest) = True Then
        For intLoop = LBound(strTest) To UBound(strTest)
            MsgBox strTest(intLoop)
        Next intLoop
    End If
End Sub
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
change vba from autofit to 13.5 width? 4 29
VBA error replacing data 6 40
Prevent user closing word document opened with VB6 6 78
VB6 - Scroll Mouse wheel on Picturebox 13 73
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question