Message 1 of 15
SaveSetting

Not applicable
09-15-2004
10:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Can someone help pls.
I wrote a macro for a family of parts and want to "savesetting" each part in
the registry.
Here are my subs.
If I replace sfile in the UserForm_Initialize() and UserForm_Terminate()
with "Part1" then this program works fine. Otherwise I got the erro msg (see
att.)
Option Explicit
Dim sFile As String
Private Sub cmdDataBase_Click()
Dim oDoc As Inventor.Document
Set oDoc = ThisApplication.ActiveDocument
sFile = Right(oDoc.DisplayName, 13)
MsgBox ("File Name is:" & sFile)
oDoc.Update
End Sub
Private Sub UserForm_Initialize()
chkShowSlotAndCrimp.Value = GetSetting("2ndTooling", sFile,
"ShowSlotAndCrimp", "true")
End Sub
Private Sub UserForm_Terminate()
SaveSetting "2ndTooling", sFile, "ShowSlotAndCrimp",
chkShowSlotAndCrimp.Value