Checkboxes not cooperating?

Benjagan91
08-10-2009, 07:50 PM
Hi,

I don't have my code on me at the moment so i'll explain this the best i can. I have an application which reads instructions from the registry called Scrub.exe

Scrub cleans things i tell it to. It gets it's settings from the registry as already stated. There is a parent program which executes sub, but first sets up the registry by cleaning out any previous settings, setting up the settings again, then runs the app before cleaning out the settings it just added.

Basically:

Remove settings.reg
Add settings.reg
Scrub.exe
Remove settings.reg

Now this has worked fine previously... but now i've modified the parent program to have checkboxes so the user gets to select what settings are added to the registry before scrub runs.

eg:

if checkbox1.value = true then
shell "regedit.exe /s emptyrecyclebin.reg"

end if

But there is like 10 of these... anyways when i tick the checkbox and click run it doesn't register that my checkboxes are ticked... i know this because i did the following:

if checkbox1.value = true then
shell "regedit.exe /s emptyrecyclebin.reg"
msgbox "Test"

end if

I didn't see the message box appear... so it's not seeing the checkbox ticked... Why is this?

Sorry i don't have my code with me right now, i'm at work so i've just tried to explain what i could.

Thanks.

Regards, Benjagan91

PeetSoft
08-10-2009, 08:27 PM
That's because you're using TRUE/FALSE.

The settings for value are:

CheckBox control — 0 is Unchecked (default), 1 is Checked, and 2 is Grayed (dimmed).

jerome_gail26
08-10-2009, 08:27 PM
Where you place this code? Also, where you place checkboxes?

jerome_gail26
08-10-2009, 08:45 PM
PeetSoft

That's because you're using TRUE/FALSE.


i think Benjagan91 is using Microsoft Form2.0 Object Library so somehow its
checkbox control works different with the default checkbox.

Benjagan91
08-10-2009, 09:57 PM
The code and check boxes are on the same form. I'll try 0/1 tonight instead of true false... but I'm pretty sure i have before and it came up with an error of some kind.

jerome_gail26
08-10-2009, 10:54 PM
For me, checkboxes value (True/False, 0/1) is not the issue but what event this code placed and if there are othrer IF ELSE statement.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum