Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would be most appreciative if someone can help me with this.
I have a user form that I want to show when a TAB, Sheet1, is selected then hide again when ANY other TAB, Sheet2, Sheet3, etc..., is selected. I've seen similar posting to do this when a cell is selected but I could not get them to work when a TAB is selected. Thank you in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Put the commands in the sheet's Worksheet_activate / Worksheet_deactivate
events, ot in the workbook's SheetActivate / SheetDeactivate events. HTH. Best wishes Harald "SJW_OST" wrote in message ... I would be most appreciative if someone can help me with this. I have a user form that I want to show when a TAB, Sheet1, is selected then hide again when ANY other TAB, Sheet2, Sheet3, etc..., is selected. I've seen similar posting to do this when a cell is selected but I could not get them to work when a TAB is selected. Thank you in advance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That works great!
The only problem I have now is I have macros that constantly activate the TAB I want that userform to auto-populate on when activated/clicked on. I tried putting "UserForm.Hide" command just behind each call of the sheet in the various macros but it did not make the userform stay hidden for the duration of the other macro(s) run, so the userform is intrupting the run of the other macros. Unless you have something that is code based, I think I'll just tie the userform to a button on the sheet. Any thoughts? Otherwise what you gave worked as I initially wanted. Thanks again. "Harald Staff" wrote: Put the commands in the sheet's Worksheet_activate / Worksheet_deactivate events, ot in the workbook's SheetActivate / SheetDeactivate events. HTH. Best wishes Harald "SJW_OST" wrote in message ... I would be most appreciative if someone can help me with this. I have a user form that I want to show when a TAB, Sheet1, is selected then hide again when ANY other TAB, Sheet2, Sheet3, etc..., is selected. I've seen similar posting to do this when a cell is selected but I could not get them to work when a TAB is selected. Thank you in advance. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Is it so that your code selects a sheet to do something there ? Selection by code is almost never necessary, you can work there by addressing it directly, like Sheets("Sheet12").Range("A1:C14").Clear Best wishes Harald "SJW_OST" wrote in message ... That works great! The only problem I have now is I have macros that constantly activate the TAB I want that userform to auto-populate on when activated/clicked on. I tried putting "UserForm.Hide" command just behind each call of the sheet in the various macros but it did not make the userform stay hidden for the duration of the other macro(s) run, so the userform is intrupting the run of the other macros. Unless you have something that is code based, I think I'll just tie the userform to a button on the sheet. Any thoughts? Otherwise what you gave worked as I initially wanted. Thanks again. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do you make a userform open automatically when you open excel? | Excel Worksheet Functions | |||
Open Dialog Box to return Selected File Path and Not Open it. | Excel Programming | |||
Listbox has some items selected when userform containing it opens. | Excel Programming | |||
changing selected label on userform w/ a variable | Excel Programming | |||
tabbing round a userform, whole field is selected | Excel Programming |