LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default updating a safearray in C++

Can you update a SafeArray size after you have created the
SafeArray sizes ? Here is the code in C++:

int TwoDimensionTableCount = 0;
VARIANT TwoDimensionArray;

void InitTable (int numberOfRows, int numberOfColumns)
{
VariantInit ( & TwoDimensionArray);
TwoDimensionArray.vt = VT_ARRAY | VT_VARIANT;
{
SAFEARRAYBOUND sab[2];
sab[0].lLbound = 1;
sab[0].cElements = numberOfRows;
sab[1].lLbound = 1;
sab[1].cElements = numberOfColumns;
TwoDimensionArray.parray = SafeArrayCreate (VT_VARIANT, 2, sab);
}
TwoDimensionTableCount = 0;
}

Thanks,
Lynn
 
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
Problem passing a large safearray to Excel Bill Below[_2_] Excel Programming 2 June 19th 06 05:40 PM
Retrieve Excel Cell Range into SAFEARRAY (VC++) Henry[_7_] Excel Programming 6 August 3rd 05 11:33 AM
SAFEARRAY [in] and [out] MB Blackburn Excel Programming 0 May 12th 05 10:08 PM
When updating a worksheet, how do I create a link updating the sa. Phlashh Excel Worksheet Functions 9 January 27th 05 06:05 PM
Fill a Range with VB SafeArray Rob[_17_] Excel Programming 3 April 9th 04 09:41 AM


All times are GMT +1. The time now is 01:19 AM.

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

About Us

"It's about Microsoft Excel"