![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: OKC
Posts: 98
|
when i activate a form, i want certain buttons on that form to become disabled depending on what sheet is active. so for example, if sheet 1 is active, i want checkbox2 and checkbox3 to become disabled when the form is opened. help.....
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
Something like this would work:
Put this on your userform, I put it in my "Initialize" event. If you are going to use a lot of different sheets, I would suggest using Select...Case instead of If...Then. e.g. Select Case ActiveSheet.Name HTH |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|