Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 2 questions again

Not sure how you are transferring your data, but if you bind the text box to
a cell on a worksheet, the value will be there when you open the form the
next time. You can do this by naming the cell and then entering that name
in the controlsource value for the text box (Properties, controlsource)

Bob L.

"john petty" wrote in message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes and
checkboxes. When I enter the data and press the ok
button, every thing works perfectly. But if I reopen the
dialog box to add more data, all the boxes are blank and
when I press the OK button everything has either been
reset except for the original checkboxes (If I add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier, show up in
the appropriate boxes so I don't have to retype or reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box all the data
is reset (including the checkboxes)?

TIA

John Petty



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 2 questions again

Thanks Bob. No for another question. If I add a control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there a way to
set a control source then set the default to false unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data, but if you

bind the text box to
a cell on a worksheet, the value will be there when you

open the form the
next time. You can do this by naming the cell and then

entering that name
in the controlsource value for the text box (Properties,

controlsource)

Bob L.

"john petty" wrote in message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes and
checkboxes. When I enter the data and press the ok
button, every thing works perfectly. But if I reopen

the
dialog box to add more data, all the boxes are blank and
when I press the OK button everything has either been
reset except for the original checkboxes (If I add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier, show up

in
the appropriate boxes so I don't have to retype or

reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box all the

data
is reset (including the checkboxes)?

TIA

John Petty



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 2 questions again

The tripleState property set to true is what allows a greyed out checkbox
to deal with a null value. The linked cell should be showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in message
...
Thanks Bob. No for another question. If I add a control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there a way to
set a control source then set the default to false unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data, but if you

bind the text box to
a cell on a worksheet, the value will be there when you

open the form the
next time. You can do this by naming the cell and then

entering that name
in the controlsource value for the text box (Properties,

controlsource)

Bob L.

"john petty" wrote in message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes and
checkboxes. When I enter the data and press the ok
button, every thing works perfectly. But if I reopen

the
dialog box to add more data, all the boxes are blank and
when I press the OK button everything has either been
reset except for the original checkboxes (If I add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier, show up

in
the appropriate boxes so I don't have to retype or

reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box all the

data
is reset (including the checkboxes)?

TIA

John Petty





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 2 questions again

Bob,

that is not doing what I need it to do. What I am
trying to do is like what is now done to the textboxes,
(show up when the form is re-activated). Using the triple
source even at false is giving me 3 stages (null, true,
false) and even without the control source pointing to the
range cell, when the form is reactivated, none of the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what allows a

greyed out checkbox
to deal with a null value. The linked cell should be

showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in message
...
Thanks Bob. No for another question. If I add a

control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there a way

to
set a control source then set the default to false

unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data, but if you

bind the text box to
a cell on a worksheet, the value will be there when you

open the form the
next time. You can do this by naming the cell and then

entering that name
in the controlsource value for the text box

(Properties,
controlsource)

Bob L.

"john petty" wrote in message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes and
checkboxes. When I enter the data and press the ok
button, every thing works perfectly. But if I reopen

the
dialog box to add more data, all the boxes are blank

and
when I press the OK button everything has either been
reset except for the original checkboxes (If I add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier, show

up
in
the appropriate boxes so I don't have to retype or

reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box all the

data
is reset (including the checkboxes)?

TIA

John Petty




.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 2 questions again

John,
If you are bound to a source the default will of course be that source.
If the check box is not bound to a cell, then the value property is the
default. Sounds like you need to have your checkboxes unbound with their
value property set to true.

Bob L.


"john petty" wrote in message
...
Bob,

that is not doing what I need it to do. What I am
trying to do is like what is now done to the textboxes,
(show up when the form is re-activated). Using the triple
source even at false is giving me 3 stages (null, true,
false) and even without the control source pointing to the
range cell, when the form is reactivated, none of the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what allows a

greyed out checkbox
to deal with a null value. The linked cell should be

showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in message
...
Thanks Bob. No for another question. If I add a

control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there a way

to
set a control source then set the default to false

unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data, but if you
bind the text box to
a cell on a worksheet, the value will be there when you
open the form the
next time. You can do this by naming the cell and then
entering that name
in the controlsource value for the text box

(Properties,
controlsource)

Bob L.

"john petty" wrote in message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes and
checkboxes. When I enter the data and press the ok
button, every thing works perfectly. But if I reopen
the
dialog box to add more data, all the boxes are blank

and
when I press the OK button everything has either been
reset except for the original checkboxes (If I add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier, show

up
in
the appropriate boxes so I don't have to retype or
reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box all the
data
is reset (including the checkboxes)?

TIA

John Petty




.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 2 questions again

Bob,

I have set the checkboxes (1 for starters) to have a
default value of true, but even then it causes issues.
The user needs to only check the box(s) that are
applicable to his/her change request, not uncheck all the
others. But even then, the box(s) does not show as
checked after the form is reactivating, so that if the
user decides to uncheck the box the value changes
accordingly.


-----Original Message-----
John,
If you are bound to a source the default will of

course be that source.
If the check box is not bound to a cell, then the value

property is the
default. Sounds like you need to have your checkboxes

unbound with their
value property set to true.

Bob L.


"john petty" wrote in message
...
Bob,

that is not doing what I need it to do. What I am
trying to do is like what is now done to the textboxes,
(show up when the form is re-activated). Using the

triple
source even at false is giving me 3 stages (null, true,
false) and even without the control source pointing to

the
range cell, when the form is reactivated, none of the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what allows a

greyed out checkbox
to deal with a null value. The linked cell should be

showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in message
...
Thanks Bob. No for another question. If I add a

control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there a

way
to
set a control source then set the default to false

unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data, but if

you
bind the text box to
a cell on a worksheet, the value will be there when

you
open the form the
next time. You can do this by naming the cell and

then
entering that name
in the controlsource value for the text box

(Properties,
controlsource)

Bob L.

"john petty" wrote in

message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes

and
checkboxes. When I enter the data and press the

ok
button, every thing works perfectly. But if I

reopen
the
dialog box to add more data, all the boxes are

blank
and
when I press the OK button everything has either

been
reset except for the original checkboxes (If I

add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier,

show
up
in
the appropriate boxes so I don't have to retype or
reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box all

the
data
is reset (including the checkboxes)?

TIA

John Petty




.



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 2 questions again

John,
I'm not following you. You can also set checkbox values using the
activate event of the user form. For example, if the checkbox is named
checkbox1, the event procedure



Private Sub UserForm_Activate()
Me.CheckBox1 = False
End Sub

will always make it false.

"John Petty" wrote in message
...
Bob,

I have set the checkboxes (1 for starters) to have a
default value of true, but even then it causes issues.
The user needs to only check the box(s) that are
applicable to his/her change request, not uncheck all the
others. But even then, the box(s) does not show as
checked after the form is reactivating, so that if the
user decides to uncheck the box the value changes
accordingly.


-----Original Message-----
John,
If you are bound to a source the default will of

course be that source.
If the check box is not bound to a cell, then the value

property is the
default. Sounds like you need to have your checkboxes

unbound with their
value property set to true.

Bob L.


"john petty" wrote in message
...
Bob,

that is not doing what I need it to do. What I am
trying to do is like what is now done to the textboxes,
(show up when the form is re-activated). Using the

triple
source even at false is giving me 3 stages (null, true,
false) and even without the control source pointing to

the
range cell, when the form is reactivated, none of the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what allows a
greyed out checkbox
to deal with a null value. The linked cell should be
showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in message
...
Thanks Bob. No for another question. If I add a
control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there a

way
to
set a control source then set the default to false
unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data, but if

you
bind the text box to
a cell on a worksheet, the value will be there when

you
open the form the
next time. You can do this by naming the cell and

then
entering that name
in the controlsource value for the text box
(Properties,
controlsource)

Bob L.

"john petty" wrote in

message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes

and
checkboxes. When I enter the data and press the

ok
button, every thing works perfectly. But if I

reopen
the
dialog box to add more data, all the boxes are

blank
and
when I press the OK button everything has either

been
reset except for the original checkboxes (If I

add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier,

show
up
in
the appropriate boxes so I don't have to retype or
reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box all

the
data
is reset (including the checkboxes)?

TIA

John Petty




.



.



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 2 questions again

Getting the Checkbox values is done. The problem is that
when I reactivate the userform, I can now get the
Textboxes to show the data that was previously entered,
but the checkboxes that were previously checked are not
showing as checked (but the cells themselves have values

i.e
If CheckMachineNotice = True Then Range _
("MachNotice").value = "X"

When the form is reactivated, the data in Range MachNotice
is there but the checkbox does not reflect that anything
has been done (i.e. false)


-----Original Message-----
John,
I'm not following you. You can also set checkbox

values using the
activate event of the user form. For example, if the

checkbox is named
checkbox1, the event procedure



Private Sub UserForm_Activate()
Me.CheckBox1 = False
End Sub

will always make it false.

"John Petty" wrote in message
...
Bob,

I have set the checkboxes (1 for starters) to have a
default value of true, but even then it causes issues.
The user needs to only check the box(s) that are
applicable to his/her change request, not uncheck all

the
others. But even then, the box(s) does not show as
checked after the form is reactivating, so that if the
user decides to uncheck the box the value changes
accordingly.


-----Original Message-----
John,
If you are bound to a source the default will of

course be that source.
If the check box is not bound to a cell, then the value

property is the
default. Sounds like you need to have your checkboxes

unbound with their
value property set to true.

Bob L.


"john petty" wrote in message
...
Bob,

that is not doing what I need it to do. What I am
trying to do is like what is now done to the

textboxes,
(show up when the form is re-activated). Using the

triple
source even at false is giving me 3 stages (null,

true,
false) and even without the control source pointing

to
the
range cell, when the form is reactivated, none of the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what

allows a
greyed out checkbox
to deal with a null value. The linked cell should

be
showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in

message
...
Thanks Bob. No for another question. If I add a
control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there a

way
to
set a control source then set the default to false
unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data, but

if
you
bind the text box to
a cell on a worksheet, the value will be there

when
you
open the form the
next time. You can do this by naming the cell

and
then
entering that name
in the controlsource value for the text box
(Properties,
controlsource)

Bob L.

"john petty" wrote in

message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes

and
checkboxes. When I enter the data and press

the
ok
button, every thing works perfectly. But if I

reopen
the
dialog box to add more data, all the boxes are

blank
and
when I press the OK button everything has

either
been
reset except for the original checkboxes (If I

add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier,

show
up
in
the appropriate boxes so I don't have to

retype or
reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box

all
the
data
is reset (including the checkboxes)?

TIA

John Petty




.



.



.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 2 questions again

John
Are you binding the checkbox using controlsource or you using an if
statement to set the value of the cell?

Bob L.


"john petty" wrote in message
...
Getting the Checkbox values is done. The problem is that
when I reactivate the userform, I can now get the
Textboxes to show the data that was previously entered,
but the checkboxes that were previously checked are not
showing as checked (but the cells themselves have values

i.e
If CheckMachineNotice = True Then Range _
("MachNotice").value = "X"

When the form is reactivated, the data in Range MachNotice
is there but the checkbox does not reflect that anything
has been done (i.e. false)


-----Original Message-----
John,
I'm not following you. You can also set checkbox

values using the
activate event of the user form. For example, if the

checkbox is named
checkbox1, the event procedure



Private Sub UserForm_Activate()
Me.CheckBox1 = False
End Sub

will always make it false.

"John Petty" wrote in message
...
Bob,

I have set the checkboxes (1 for starters) to have a
default value of true, but even then it causes issues.
The user needs to only check the box(s) that are
applicable to his/her change request, not uncheck all

the
others. But even then, the box(s) does not show as
checked after the form is reactivating, so that if the
user decides to uncheck the box the value changes
accordingly.


-----Original Message-----
John,
If you are bound to a source the default will of
course be that source.
If the check box is not bound to a cell, then the value
property is the
default. Sounds like you need to have your checkboxes
unbound with their
value property set to true.

Bob L.


"john petty" wrote in message
...
Bob,

that is not doing what I need it to do. What I am
trying to do is like what is now done to the

textboxes,
(show up when the form is re-activated). Using the
triple
source even at false is giving me 3 stages (null,

true,
false) and even without the control source pointing

to
the
range cell, when the form is reactivated, none of the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what

allows a
greyed out checkbox
to deal with a null value. The linked cell should

be
showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in

message
...
Thanks Bob. No for another question. If I add a
control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there a
way
to
set a control source then set the default to false
unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data, but

if
you
bind the text box to
a cell on a worksheet, the value will be there

when
you
open the form the
next time. You can do this by naming the cell

and
then
entering that name
in the controlsource value for the text box
(Properties,
controlsource)

Bob L.

"john petty" wrote in
message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both textboxes
and
checkboxes. When I enter the data and press

the
ok
button, every thing works perfectly. But if I
reopen
the
dialog box to add more data, all the boxes are
blank
and
when I press the OK button everything has

either
been
reset except for the original checkboxes (If I
add no
data), or it overwrites the existing data.

1) Is there a way to have data entered earlier,
show
up
in
the appropriate boxes so I don't have to

retype or
reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box

all
the
data
is reset (including the checkboxes)?

TIA

John Petty




.



.



.



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 2 questions again

Bob, I am using If/Then statements to set the values.
would it be cleaner to set a ControlSource?


-----Original Message-----
Getting the Checkbox values is done. The problem is that
when I reactivate the userform, I can now get the
Textboxes to show the data that was previously entered,
but the checkboxes that were previously checked are not
showing as checked (but the cells themselves have values

i.e
If CheckMachineNotice = True Then Range _
("MachNotice").value = "X"

When the form is reactivated, the data in Range

MachNotice
is there but the checkbox does not reflect that anything
has been done (i.e. false)


-----Original Message-----
John,
I'm not following you. You can also set checkbox

values using the
activate event of the user form. For example, if the

checkbox is named
checkbox1, the event procedure



Private Sub UserForm_Activate()
Me.CheckBox1 = False
End Sub

will always make it false.

"John Petty" wrote in message
.. .
Bob,

I have set the checkboxes (1 for starters) to have a
default value of true, but even then it causes issues.
The user needs to only check the box(s) that are
applicable to his/her change request, not uncheck all

the
others. But even then, the box(s) does not show as
checked after the form is reactivating, so that if the
user decides to uncheck the box the value changes
accordingly.


-----Original Message-----
John,
If you are bound to a source the default will of
course be that source.
If the check box is not bound to a cell, then the

value
property is the
default. Sounds like you need to have your checkboxes
unbound with their
value property set to true.

Bob L.


"john petty" wrote in message
...
Bob,

that is not doing what I need it to do. What I am
trying to do is like what is now done to the

textboxes,
(show up when the form is re-activated). Using the
triple
source even at false is giving me 3 stages (null,

true,
false) and even without the control source pointing

to
the
range cell, when the form is reactivated, none of

the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what

allows a
greyed out checkbox
to deal with a null value. The linked cell should

be
showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in

message
...
Thanks Bob. No for another question. If I add a
control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there

a
way
to
set a control source then set the default to

false
unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data,

but
if
you
bind the text box to
a cell on a worksheet, the value will be there

when
you
open the form the
next time. You can do this by naming the cell

and
then
entering that name
in the controlsource value for the text box
(Properties,
controlsource)

Bob L.

"john petty" wrote in
message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both

textboxes
and
checkboxes. When I enter the data and press

the
ok
button, every thing works perfectly. But if I
reopen
the
dialog box to add more data, all the boxes are
blank
and
when I press the OK button everything has

either
been
reset except for the original checkboxes (If I
add no
data), or it overwrites the existing data.

1) Is there a way to have data entered

earlier,
show
up
in
the appropriate boxes so I don't have to

retype or
reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box

all
the
data
is reset (including the checkboxes)?

TIA

John Petty




.



.



.

.



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 2 questions again

If you use controlsource it is going to put true or false in the cell rather
than an X like you are doing. Doing it your way there is no direct linkage
between the cell and the checkbox. To create what you want you will need to
check the value of the cell when the form is opened and set the value of the
checkbox accordingly. To do that double click on the form in the VB editor
to open the code for the userform. Select Userform in the left drop down and
activate in the right. Then put your code in the activate event procedure,
like this:

Private Sub UserForm_Activate()
If Range("Machnotice") = "X" Then
CheckMachineNotice = True
Else
CheckMachineNotice = False
End If

End Sub
HTH
Bob L
"john petty" wrote in message
...
Bob, I am using If/Then statements to set the values.
would it be cleaner to set a ControlSource?


-----Original Message-----
Getting the Checkbox values is done. The problem is that
when I reactivate the userform, I can now get the
Textboxes to show the data that was previously entered,
but the checkboxes that were previously checked are not
showing as checked (but the cells themselves have values

i.e
If CheckMachineNotice = True Then Range _
("MachNotice").value = "X"

When the form is reactivated, the data in Range

MachNotice
is there but the checkbox does not reflect that anything
has been done (i.e. false)


-----Original Message-----
John,
I'm not following you. You can also set checkbox

values using the
activate event of the user form. For example, if the

checkbox is named
checkbox1, the event procedure



Private Sub UserForm_Activate()
Me.CheckBox1 = False
End Sub

will always make it false.

"John Petty" wrote in message
.. .
Bob,

I have set the checkboxes (1 for starters) to have a
default value of true, but even then it causes issues.
The user needs to only check the box(s) that are
applicable to his/her change request, not uncheck all

the
others. But even then, the box(s) does not show as
checked after the form is reactivating, so that if the
user decides to uncheck the box the value changes
accordingly.


-----Original Message-----
John,
If you are bound to a source the default will of
course be that source.
If the check box is not bound to a cell, then the

value
property is the
default. Sounds like you need to have your checkboxes
unbound with their
value property set to true.

Bob L.


"john petty" wrote in message
...
Bob,

that is not doing what I need it to do. What I am
trying to do is like what is now done to the

textboxes,
(show up when the form is re-activated). Using the
triple
source even at false is giving me 3 stages (null,

true,
false) and even without the control source pointing

to
the
range cell, when the form is reactivated, none of

the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what

allows a
greyed out checkbox
to deal with a null value. The linked cell should

be
showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in

message
...
Thanks Bob. No for another question. If I add a
control
source for the checkboxes, the checkboxes shade a
checkmark and I get "**" on the sheet. Is there

a
way
to
set a control source then set the default to

false
unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data,

but
if
you
bind the text box to
a cell on a worksheet, the value will be there

when
you
open the form the
next time. You can do this by naming the cell

and
then
entering that name
in the controlsource value for the text box
(Properties,
controlsource)

Bob L.

"john petty" wrote in
message
...
Sorry about that. Try it again.

I have a userform that transfers the data to a
spreadsheet. This userform uses both

textboxes
and
checkboxes. When I enter the data and press

the
ok
button, every thing works perfectly. But if I
reopen
the
dialog box to add more data, all the boxes are
blank
and
when I press the OK button everything has

either
been
reset except for the original checkboxes (If I
add no
data), or it overwrites the existing data.

1) Is there a way to have data entered

earlier,
show
up
in
the appropriate boxes so I don't have to

retype or
reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog box

all
the
data
is reset (including the checkboxes)?

TIA

John Petty




.



.



.

.



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 2 questions again

and Whalla. Thanks Bob. You MVP's are the best.
-----Original Message-----
If you use controlsource it is going to put true or false

in the cell rather
than an X like you are doing. Doing it your way there is

no direct linkage
between the cell and the checkbox. To create what you

want you will need to
check the value of the cell when the form is opened and

set the value of the
checkbox accordingly. To do that double click on the

form in the VB editor
to open the code for the userform. Select Userform in the

left drop down and
activate in the right. Then put your code in the

activate event procedure,
like this:

Private Sub UserForm_Activate()
If Range("Machnotice") = "X" Then
CheckMachineNotice = True
Else
CheckMachineNotice = False
End If

End Sub
HTH
Bob L
"john petty" wrote in message
...
Bob, I am using If/Then statements to set the values.
would it be cleaner to set a ControlSource?


-----Original Message-----
Getting the Checkbox values is done. The problem is

that
when I reactivate the userform, I can now get the
Textboxes to show the data that was previously entered,
but the checkboxes that were previously checked are not
showing as checked (but the cells themselves have

values

i.e
If CheckMachineNotice = True Then Range _
("MachNotice").value = "X"

When the form is reactivated, the data in Range

MachNotice
is there but the checkbox does not reflect that

anything
has been done (i.e. false)


-----Original Message-----
John,
I'm not following you. You can also set checkbox
values using the
activate event of the user form. For example, if the
checkbox is named
checkbox1, the event procedure



Private Sub UserForm_Activate()
Me.CheckBox1 = False
End Sub

will always make it false.

"John Petty" wrote in message
.. .
Bob,

I have set the checkboxes (1 for starters) to have

a
default value of true, but even then it causes

issues.
The user needs to only check the box(s) that are
applicable to his/her change request, not uncheck

all
the
others. But even then, the box(s) does not show as
checked after the form is reactivating, so that if

the
user decides to uncheck the box the value changes
accordingly.


-----Original Message-----
John,
If you are bound to a source the default will

of
course be that source.
If the check box is not bound to a cell, then the

value
property is the
default. Sounds like you need to have your

checkboxes
unbound with their
value property set to true.

Bob L.


"john petty" wrote in

message
...
Bob,

that is not doing what I need it to do. What

I am
trying to do is like what is now done to the
textboxes,
(show up when the form is re-activated). Using

the
triple
source even at false is giving me 3 stages (null,
true,
false) and even without the control source

pointing
to
the
range cell, when the form is reactivated, none of

the
checked boxes are shown as checked.

-----Original Message-----
The tripleState property set to true is what
allows a
greyed out checkbox
to deal with a null value. The linked cell

should
be
showing either True or
false (or nothing if triple state is true).

Bob L.
"John Petty" wrote in
message
...
Thanks Bob. No for another question. If I

add a
control
source for the checkboxes, the checkboxes

shade a
checkmark and I get "**" on the sheet. Is

there
a
way
to
set a control source then set the default to

false
unless
checked (for the adding data set)


-----Original Message-----
Not sure how you are transferring your data,

but
if
you
bind the text box to
a cell on a worksheet, the value will be

there
when
you
open the form the
next time. You can do this by naming the

cell
and
then
entering that name
in the controlsource value for the text box
(Properties,
controlsource)

Bob L.

"john petty" wrote

in
message
news:1b8d01c3869e$45b54c10

...
Sorry about that. Try it again.

I have a userform that transfers the data

to a
spreadsheet. This userform uses both

textboxes
and
checkboxes. When I enter the data and

press
the
ok
button, every thing works perfectly. But

if I
reopen
the
dialog box to add more data, all the boxes

are
blank
and
when I press the OK button everything has
either
been
reset except for the original checkboxes

(If I
add no
data), or it overwrites the existing data.

1) Is there a way to have data entered

earlier,
show
up
in
the appropriate boxes so I don't have to
retype or
reset?

If the answer to #1 is No then

2) Is there a way if I reopen the dialog

box
all
the
data
is reset (including the checkboxes)?

TIA

John Petty




.



.



.

.



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
2 questions assaf1978 Charts and Charting in Excel 4 February 16th 09 10:26 AM
View Questions and Answer to questions I created Roibn Taylor Excel Discussion (Misc queries) 4 July 24th 08 12:05 AM
2 questions jkf New Users to Excel 2 November 2nd 06 08:58 PM
A few questions please help! mjay123 New Users to Excel 4 February 8th 06 08:04 PM


All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"