| | |
passing array between Excel '03 and VB '08
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2008
Posts: 56
Reputation:
Solved Threads: 0
I'm trying to write a program in VB2008 that uses a 2003 Excel spreadsheet as the interface. To help with this I am trying to pass data to and from macros inside the spreadsheet. I call a macro from VB with this line:
where gArr is an array and ArrGather is a macro. Problem is even though I've specified the macro to take gArr as ByRef, the array is always passed byvalue - no updates to the array are reflected afterwards. Any ideas why Visual Basic 2008 can't pass variables by reference to excel 03 macros?
VB.NET Syntax (Toggle Plain Text)
Call gXLApp.Run(gwbTB.Name & "!ArrGather", gArr)
where gArr is an array and ArrGather is a macro. Problem is even though I've specified the macro to take gArr as ByRef, the array is always passed byvalue - no updates to the array are reflected afterwards. Any ideas why Visual Basic 2008 can't pass variables by reference to excel 03 macros?
![]() |
Similar Threads
- Visual basic macro in Excel. (Visual Basic 4 / 5 / 6)
- Query On Passing a datarow array as an argument (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: sl.no in crystal report
- Next Thread: how to modify an exe without preparing a setup afresh
| Thread Tools | Search this Thread |
.net .net2008 30minutes 2005 2008 access account arithmetic array basic bing button buttons center check code combobox component connectionstring crystalreport data database databasesearch datagrid datagridview date design dissertation dissertations dropdownlist excel fade file-dialog filter folder ftp generatetags google gridview hardcopy images input insert intel internet mobile monitor ms net networking objects output panel passingparameters peertopeervideostreaming picturebox picturebox1 port position print printing problem problemwithinstallation project save searchbox searchvb.net select serial shutdown soap survey table tcp temperature text textbox timer timespan toolbox trim update updown user vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf year





