change attributes of numberous textboxes
To all
Was wondering if there was a way to change to properties (say visible) of numerous textboxes at once. I have tried a for loop with i and then textbox(i) or textbox (format (i)) and even name1= "textbox" + format (i) then name1.visible but nothing works! Is there a way to change them all or do i have to type them all out? AHGA Shawn |
change attributes of numberous textboxes
for i = 1 to 10 userform1.Controls("Textbox" & i).Visible = False Next for a worksheet for i = 1 to 10 activesheet.OleObjects("Textbox" & i).Visible = False Next i this assumes these are textboxes from the control toolbox toolbar with names like Textbox1, Textbox2, up to Textbox10. -- Regards, Tom Ogilvy "Shawn" wrote in message ... To all Was wondering if there was a way to change to properties (say visible) of numerous textboxes at once. I have tried a for loop with i and then textbox(i) or textbox (format (i)) and even name1= "textbox" + format (i) then name1.visible but nothing works! Is there a way to change them all or do i have to type them all out? AHGA Shawn |
change attributes of numberous textboxes
Tom
THKS!!! You saved me a whole lot of typing!! Thanks again! Shawn "Tom Ogilvy" wrote in message ... for i = 1 to 10 userform1.Controls("Textbox" & i).Visible = False Next for a worksheet for i = 1 to 10 activesheet.OleObjects("Textbox" & i).Visible = False Next i this assumes these are textboxes from the control toolbox toolbar with names like Textbox1, Textbox2, up to Textbox10. -- Regards, Tom Ogilvy "Shawn" wrote in message ... To all Was wondering if there was a way to change to properties (say visible) of numerous textboxes at once. I have tried a for loop with i and then textbox(i) or textbox (format (i)) and even name1= "textbox" + format (i) then name1.visible but nothing works! Is there a way to change them all or do i have to type them all out? AHGA Shawn |
All times are GMT +1. The time now is 11:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com