Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Within VB, how to pass results of a FormulaArray to a variable.

I am working with a series of matrices. I want to load the first matrix with
constants. I know how to do that. I then want to use some functions like
MMULT and MINVERSE and put the results (sometimes one number, sometimes a
matrix) into an object where I can reference the value in a subsequent matrix
operation. When I merely dimension an array, I can't seem to pass the
results of a matrix function to that array or use the array within a matrix
function.

On a similar issue with arrays, I have a project where I want to delete
mutliple sheets based upon some selection criteria. I could do it one at a
time, but it gets annoying answering the question "Do you want to delete".
Therefore I'd like to delete and array of sheets. When I record the action
of grouping sheets and then deleting them, I notice it uses
"Array(sheet1,sheet2,sheet3)". Is there a way I can load an array with the
sheets I want to delete and then issue one delete statement?
  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Within VB, how to pass results of a FormulaArray to a variable.

With regards to deleting sheets, yes you can delete them in one go and you
can prevent the "Are you Sure" from popping up by disabling alerts (then
enabling after you've deleted the sheets).

Application.DisplayAlerts = False
Sheets(Array("Sheet3", "Sheet4")).Delete
Application.DisplayAlerts = True

"Tim" wrote:

I am working with a series of matrices. I want to load the first matrix with
constants. I know how to do that. I then want to use some functions like
MMULT and MINVERSE and put the results (sometimes one number, sometimes a
matrix) into an object where I can reference the value in a subsequent matrix
operation. When I merely dimension an array, I can't seem to pass the
results of a matrix function to that array or use the array within a matrix
function.

On a similar issue with arrays, I have a project where I want to delete
mutliple sheets based upon some selection criteria. I could do it one at a
time, but it gets annoying answering the question "Do you want to delete".
Therefore I'd like to delete and array of sheets. When I record the action
of grouping sheets and then deleting them, I notice it uses
"Array(sheet1,sheet2,sheet3)". Is there a way I can load an array with the
sheets I want to delete and then issue one delete statement?

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
Formula help - Sum results Pass or Fail Nadine Excel Worksheet Functions 9 August 6th 13 10:20 AM
pass variable from one workbook to another calebjill Excel Discussion (Misc queries) 2 January 28th 09 07:38 PM
Pass a variable into a range? Ian Fleming[_2_] Excel Programming 1 September 7th 05 09:45 AM
Using Public to Pass Variable D.Parker Excel Programming 8 March 24th 05 10:39 PM
How to pass variable value between macros BCS Excel Programming 0 July 25th 03 08:01 PM


All times are GMT +1. The time now is 03:19 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"