Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to change a checkbox value in Excel

Avatar of aviveros
aviveros asked on
Visual Basic ClassicVB Script
8 Comments1 Solution650 ViewsLast Modified:
Hi, I am designing a program in VB6, this program reads an employees database, opens a Excel file and fills many fields in a designed format. The program doesn't have problems to write data in the cells, but I can't change the value in the checkboxs the form has. For example, in the form there are 2 checkboxs which indicate the sex: one for indicate if the person is masculine and other for indicate if the person is feminine. So, depending on the values the program reads from the database, it has to turn on one check box and turn off the other one. I created a macro in Excel to see the code, but it doesn't work in VB. I copy the code of the macro below. Thanks.
    ActiveSheet.Shapes("Check Box 6").Select
    With Selection
        .Value = xlOn
    End With
Avatar of PaulHews
PaulHewsFlag of Canada image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers