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

Hi all.
My question is, how can i set off a part of an userform if a checkbox is
set as true? the idea is that all other coices get "grey" and can't be
handled until the input of the relationed data is finished.
Exapmle: the checkbox should verify if a person pays cash or a credit
card. if he pays cash, the information about the credit card should'n be
available.

thx a lot,
rodrigo

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Userform handling

Hi,

You can set the Enabled property to True or False depending on whether
its relevant.
Some thing like this where the checkbox with tick is for Credit card stuff.

Private Sub CheckBox1_Click()
With CheckBox1
' credit card related
Label1.Enabled = .Value
TextBox1.Enabled = .Value

' cash related
Label2.Enabled = Not .Value
Label2.Enabled = Not .Value
End With
End Sub

Cheers
Andy

rodrigo wrote:
Hi all.
My question is, how can i set off a part of an userform if a checkbox is
set as true? the idea is that all other coices get "grey" and can't be
handled until the input of the relationed data is finished.
Exapmle: the checkbox should verify if a person pays cash or a credit
card. if he pays cash, the information about the credit card should'n be
available.

thx a lot,
rodrigo


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Userform handling

on the click event of the checkbox, check that its value is true, then set
the enabled property of the controls you want greyed to false. Using
Frames might make some of this easier. Disabling the frame will disable the
controls in the frame (although the controls are not greyed - only the frame
is).

--
Regards,
Tom Ogilvy

"rodrigo" wrote in message
lkaboutsoftware.com...
Hi all.
My question is, how can i set off a part of an userform if a checkbox is
set as true? the idea is that all other coices get "grey" and can't be
handled until the input of the relationed data is finished.
Exapmle: the checkbox should verify if a person pays cash or a credit
card. if he pays cash, the information about the credit card should'n be
available.

thx a lot,
rodrigo



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Userform handling

Something like

Private Sub CheckBox1_Click()
With TextBox1
If Me.CheckBox1.Value Then
.Enabled = True
.BackColor = &HFFFFFF
Else
.Enabled = False
.BackColor = 12632256
End If
End With
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"rodrigo" wrote in message
lkaboutsoftware.com...
Hi all.
My question is, how can i set off a part of an userform if a checkbox is
set as true? the idea is that all other coices get "grey" and can't be
handled until the input of the relationed data is finished.
Exapmle: the checkbox should verify if a person pays cash or a credit
card. if he pays cash, the information about the credit card should'n be
available.

thx a lot,
rodrigo



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
Error Handling Kevin Excel Discussion (Misc queries) 4 June 19th 08 12:31 AM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM
file handling Jo[_6_] Excel Programming 2 April 6th 04 06:20 PM
Error Handling Todd Excel Programming 1 February 13th 04 11:29 PM
Error Handling James Agostinho Excel Programming 1 January 30th 04 06:40 AM


All times are GMT +1. The time now is 09:26 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"