Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Array Declaration.
Hello everyone,
I was developing one excel programming, i have 100 button in one sheet. can i used array to assign the button visibility = TRUE using array ? I am very new to VBA. My last programming language i learn was C++ and it was 12 years ago..Now i am sort of refreshing everything.. regards, Aisar Apis |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Array Declaration.
On Nov 5, 7:38*am, apis wrote:
Hello everyone, * * *I was developing one excel programming, i have 100 button in one sheet. can i used array to assign the button visibility = TRUE using array ? I am very new to VBA. My last programming language i learn was C++ and it was 12 years ago..Now i am sort of refreshing everything.. regards, Aisar Apis Sure. If you put, say, Forms Buttons on a sheet you can treat the as shapes: Sub buttonHider() Dim sh As Shape For Each sh In ActiveSheet.Shapes MsgBox sh.Name Next ary = Array("Button 1", "Button 2") n = Application.InputBox(prompt:="enter button index", Type:=1) Set sh = ActiveSheet.Shapes(n) sh.Visible = msoFalse End Sub use 1 rather than 0 for the first buttton |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Workbook Declaration | Excel Discussion (Misc queries) | |||
VBA - variable declaration | Excel Discussion (Misc queries) | |||
type declaration characters | Excel Discussion (Misc queries) | |||
type declaration characters | Excel Discussion (Misc queries) | |||
Use DocProps in a change declaration | Excel Worksheet Functions |