|
-
Feb 27th, 2007, 03:09 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] GetSetting easy question
What is wrong with this code, when i run the program i get the message: Type Mismatch
Code:
ChkTray.Value = GetSetting("SecApp", "Restrict", "NoTray", "")
If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.
If you fail, try and try again, its the only way to success.
-
Feb 27th, 2007, 03:21 PM
#2
Re: GetSetting easy question
GetSetting returns a string. Try
ChkTray.Value = CBool(GetSetting("SecApp", "Restrict", "NoTray", "False"))
-
Feb 27th, 2007, 03:29 PM
#3
Thread Starter
Hyperactive Member
Re: GetSetting easy question
now i get the error invalid value because the value is a number - 1 or 0
and if a put false it will set the value as false thats why mine was ""
If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.
If you fail, try and try again, its the only way to success.
-
Feb 27th, 2007, 03:43 PM
#4
Re: GetSetting easy question
Assuming ChkTray is a checkbox, the value property needs an integer of 0, 1 or 2.
Code:
ChkTray.Value = CInt(GetSetting("SecApp", "Restrict", "NoTray", "0"))
-
Feb 27th, 2007, 03:50 PM
#5
Re: GetSetting easy question
My bad Mixed up radio button with checkbox values.
-
Feb 27th, 2007, 03:57 PM
#6
Thread Starter
Hyperactive Member
Re: GetSetting easy question
thanks to both of you.
Shoolbusdriver i will give you reputation when i can it says i should spread some round, even though u ave helped me a lot of times.
If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.
If you fail, try and try again, its the only way to success.
-
Feb 27th, 2007, 04:02 PM
#7
Re: [RESOLVED] GetSetting easy question
Happy to help
(@leinad31, I do it regularly )
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
|
Click Here to Expand Forum to Full Width
|