#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook Declaration Varne Excel Discussion (Misc queries) 3 April 29th 08 09:49 AM
VBA - variable declaration Jeff Excel Discussion (Misc queries) 3 January 9th 08 12:45 PM
type declaration characters integreat Excel Discussion (Misc queries) 3 July 18th 06 04:31 PM
type declaration characters integreat Excel Discussion (Misc queries) 1 July 17th 06 10:02 PM
Use DocProps in a change declaration chris w Excel Worksheet Functions 7 January 21st 05 11:35 PM


All times are GMT +1. The time now is 02:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"