TextBox Properties

fucell

New Member
Joined
Jan 3, 2011
Messages
46
Hi to all..

I just want to ask if theres a way to enable and disabled 8 textbox in a shorter code (excek macro). below is my code

txt1.enable = true
txt2.enable = true
txt3.enable = true
txt4.enable = true
txt5.enable = true
txt6.enable = true

thanks in advance.

fucell
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
or should i say, is there a way to shorten this code ?

Range("b2").Value = frmquote.txtdate.Value
Range("b3").Value = frmquote.txtquote.Value
Range("b4").Value = frmquote.txtsalesman.Value
Range("b5").Value = frmquote.txtdterequired.Value
Range("b8").Value = frmquote.txtCompName.Value
Range("b9").Value = frmquote.txtadd1.Value
Range("b10").Value = frmquote.cmbo1.Value

frmquote.txtdate.enable = false
frmquote.txtquote.enable = false
frmquote.txtsalesman.enable = false
frmquote.txtdterequired.enable = false
frmquote.txtCompName.enable = false
frmquote.txtadd1.enable = false
frmquote.cmbo1.enable = false

thanks in advance.
 
Upvote 0

Forum statistics

Threads
1,215,453
Messages
6,124,930
Members
449,195
Latest member
Stevenciu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top