473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ByRef question

Hello all,

Here's my scenario. I have an Access app that needs to grab data from
an Excel worksheet. What I've done is create a function in Access
that simply calls excel.run(myproc(arg1, arg2)).

The excel proc needs to return a bunch of numbers so I pass ByRef. I
can't think of a cleaner way of doing this without updating the db in
excel itself.

My question:

In Access, when I declare my excel object as an object, the byref
works, but if I declare it as Excel.Application then it doesn't work.
Why?

In both tests, I use set xlsApp = new excel.application, the only
difference is in the actualy dim statement.

Am I missing something here, cause I'd really like to bind early, it's
just cleaner.

Thx,
Bodi
Nov 13 '05 #1
0 1148

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bodi | last post by:
Hello all, Here's my scenario. I have an Access app that needs to grab data from an Excel worksheet. What I've done is create a function in Access that simply calls excel.run(myproc(arg1,...
5
by: Iams | last post by:
Forgive my newbie question, but I guess I don't understand passing parameters, in my case an array. I have a procedure which calls another procedure, passing an array. The new procedure creates...
14
by: Robin Tucker | last post by:
Although I've been working on this project for 8 months now, I'm still not sure of the difference between ByVal and ByRef. As most objects in VB are reference types, passing ByVal I've discovered...
2
by: Neil Munro | last post by:
I'm having some "type" difficulty in passing a .NET array (byref) to a COM based API (Autodesk Inventor). In VB6 the code to return an array of tolerance values is: Dim ToleranceCount As Long...
5
by: Ghislain Tanguay | last post by:
Hi! I'm maybe from old school but, for me, whebn it's time to call a method from DCOM, remoting or web service returning a string or anything else I use a function. It's more verbose. In my new...
13
by: Shannon Richards | last post by:
Hello: I have a problem using ByRef arguments with Option Strict ON. I have built a generic sub procedure "ChangeValue()" to change the value of an argument if the new value is not the same as the...
11
by: John Pass | last post by:
Hi, In the attached example, I do understand that the references are not changed if an array is passed by Val. What I do not understand is the result of line 99 (If one can find this by line...
3
by: doriengard | last post by:
Dear VB gurus, A long question, thanks for your patience in advance :-) Part 1) I have a VB windows application that contains a start-up form: frmMain
7
by: Monty | last post by:
Silly question: If I return an object from a property, is it returned ByRef or ByVal? Is there a way to specify one way or the other? For instance, will the code that calls the MyObject() property...
5
by: Rob Meade | last post by:
Hi all, Until just recently most of my functions would have all been using Byval, when I realised the advantages of ByRef, where appropriate I have used it instead, my question - are there any...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.