-
Solved: Show if no setting
I am using this code to show a form on install only if my user wants to see it. However, if they have never saved their settings before it doesn't show it either. Here is the code:
[VBA]On Error Resume Next
If GetSetting("Business Reporting Today", "General", "Show New Features") = True Then
NewVersionForm.Show 0
End If[/VBA]
and in another spot I use this code and it won't work either:
[VBA]Sub addToolBar()
On Error Resume Next
If GetSetting("Business Reporting Today", "General", "Professional") = True Then
ProfessionalEdition 'this is a sub
End
ElseIf GetSetting("Business Reporting Today", "General", "Standard") = True Then
StandardEdition 'this is a sub
End
End If
'if the user never set their settings before this form should show but it doesn't
InstallForm.Show
End Sub[/VBA]
-
Works fine for me, why don't you do
[vba]
MsgBox GetSetting("Business Reporting Today", "General", "Professional")
[/vba]
to see what you have got there.
-
I am trying it on machines that have no settings saved yet. So that would be blank. I even tried this
[VBA]On Error Resume Next
if err then
'if the user never set their settings before this form should show but it doesn't
InstallForm.Show
end if
If GetSetting("Business Reporting Today", "General", "Professional") = True Then
ProfessionalEdition 'this is a sub
End
ElseIf GetSetting("Business Reporting Today", "General", "Standard") = True Then
StandardEdition 'this is a sub
End
End If
[/VBA]
-
All the facts help a lot
[vba]
Dim fResult As Boolean
On Error Resume Next
fResult = GetSetting("Business Reporting Today", "General", "Professional")
On Error GoTo 0
If fResult = True Then
ProfessionalEdition 'this is a sub
End
Else
On Error Resume Next
fResult = GetSetting("Business Reporting Today", "General", "Standard")
On Error GoTo 0
If fResult = True Then
StandardEdition 'this is a sub
End
End If
End If
[/vba]
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules