dYNAMIC Array declaration, a small correction in my last thread!
Hello all!
A small correction in my last thread. In the following macro, how do I declare the variable 'Y' as a dynami array, that can store as many values as stored in the variabl 'stages'? ============================================== Sub triall() x = 0 i=1 stages = InputBox("Enter the number of stages for CDF comparison") x = x + stages Do Until x nstages = InputBox("Enter the stage number!") Y(i) = nstages i = i + 1 Loop End Sub ============================================== Another quick qn: I deleted the default 'Help' menu from Excel while defining my ow Menus. How do I get it back to the Excel? I did'nt save the changes still it did'nt even prompt me while I closed the Excel workbook and lost the default 'Help' menu from the toolbars. Would appreciate your help. Thanks a bunch. Regds, Arun. Vtec corp -- Message posted from http://www.ExcelForum.com |
dYNAMIC Array declaration, a small correction in my last thread!
Sub triall()
Dim Y() as Long x = 0 i=1 stages = InputBox("Enter the number of stages for CDF comparison") x = x + stages Redim Y(1 to stages) Do Until i x nstages = InputBox("Enter the stage number!") Y(i) = nstages i = i + 1 Loop End Sub -- Regards, Tom Ogilvy "aiyer " wrote in message ... Hello all! A small correction in my last thread. In the following macro, how do I declare the variable 'Y' as a dynamic array, that can store as many values as stored in the variable 'stages'? ============================================== Sub triall() x = 0 i=1 stages = InputBox("Enter the number of stages for CDF comparison") x = x + stages Do Until x nstages = InputBox("Enter the stage number!") Y(i) = nstages i = i + 1 Loop End Sub ============================================== Another quick qn: I deleted the default 'Help' menu from Excel while defining my own Menus. How do I get it back to the Excel? I did'nt save the changes, still it did'nt even prompt me while I closed the Excel workbook and I lost the default 'Help' menu from the toolbars. Would appreciate your help. Thanks a bunch. Regds, Arun. Vtec corp. --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 06:49 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com