将它放在一个模块中(我认为它来自Randall Rath)代码3]
这为我更改了密钥,但我没有使用工作表集来测试它。
- Sub SetSheetSet()
- Dim CadStart As String
- Dim KeyName As String
- Dim valueName As String
- Dim DefaultData As String
- Dim dataValue As String
- 'This is my key "HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.0\ACAD-5005:409\Profiles\Lex2007\General"
- KeyName = "Software\Autodesk\AutoCAD\R17.0\ACAD-5005:409\Profiles\Lex2007\General"
-
- valueName = "SheetSetTemplatePath"
- dataValue = "YourTemplatePath"
-
- WriteStringValue HKEY_CURRENT_USER, KeyName, valueName, dataValue
-
-
- Debug.Print ReadRegVal(HKEY_CURRENT_USER, KeyName, valueName, DefaultData)
-
- End Sub
|