vba help please

C

Coyote

Just an idea - is it possible to use an excel style
address in a macro? The following is the address used by
excel for the big pasted link array that I was describing.

=Excel.Sheet.8|'C:\Documents and Settings\trader1
\Desktop\research.xls'!'!Sheet1!R10C3:R3909C3'

I am thinking that maybe if vba cannot see the
research.xls through its onw addressing - perhaps it might
be able to use the excel style.??



-----Original Message-----
In my present setup - I am running two instances of excel
and transfering data between the two via a huge pasted
link array; but have the idea that a vba program that
transmits the data a piece at a time would be more
efficient than the big pasted link.

That is why I am trying to figure out how to accomplish
the task I have been asking about. I figured if I could
get that little part to work, then I could write the macro
to accomplish the larger task.

But so far, I am unable to get vba in one instance to see
the other instance.

-----Original Message-----
I've been sitting here just ~assuming~ the whole time that Excel was
one of those application that didn't support multiple instances of
itself running at the same time. But, well, sure enough I just
opened a second instance of Excel with two separate process IDs.
Blushing. :]

The two instances are aware of each other though. Instance 2 opened
with Book4 as the default workbook name, as I already
had
1, 2, 3 in
the first instance. I then created book5 in instance 1, went back to
instance 2, created another workbook, and that created
as
book6.

But I think you're probably right about what's going on.

Ray at work

"Jim Thomlinson"
message news:5DE756F1-953F-4197-B8FB- (e-mail address removed)... instance of
Excel. If that the
macro can not


.
.
 
C

Coyoote

The reason I use two instances of excel is that I create
charts of the data that is generated on the first instance
and during the day, I have to adjust them as the day
unfolds. If they (the charts) are in the same instance
where the data is being collected, it makes that instance
crash.

However, transmitting the collected data to a second
instance and charting it there, solves the crashing
problem since I am then able to manipulate the charts
without disturbing the vba processes in the first instance.

Make sense??

-----Original Message-----
But why 2 instances? Why not 2 spread sheets open in the same instance? That
would be a lot easier to deal with...

Coyote said:
In my present setup - I am running two instances of excel
and transfering data between the two via a huge pasted
link array; but have the idea that a vba program that
transmits the data a piece at a time would be more
efficient than the big pasted link.

That is why I am trying to figure out how to accomplish
the task I have been asking about. I figured if I could
get that little part to work, then I could write the macro
to accomplish the larger task.

But so far, I am unable to get vba in one instance to see
the other instance.

-----Original Message-----
I've been sitting here just ~assuming~ the whole time that Excel was
one of those application that didn't support multiple instances of
itself running at the same time. But, well, sure
enough
I just
opened a second instance of Excel with two separate process IDs.
Blushing. :]

The two instances are aware of each other though. Instance 2 opened
with Book4 as the default workbook name, as I already
had
1, 2, 3 in
the first instance. I then created book5 in instance
1,
went back to
instance 2, created another workbook, and that created
as
book6.
But I think you're probably right about what's going on.

Ray at work

"Jim Thomlinson"
message news:5DE756F1-953F-4197-B8FB- (e-mail address removed)...
Just a thought but is Research.xls open in a
seperate
instance of
Excel. If
so then it is possible that although research is
open
that the
macro can not
see it...



.
.
 
C

Coyote

I have tried running a second workbook in the first
instance to do my charting, but for some reason,
manipulating the charts while the vba is running in the
other workbook makes the whole thing crash.

Running my charting in a second instance allows me to
manipulate/adjust the charts during the day without
interefering with the running macro.


-----Original Message-----
There is probably no reason to have two instances of excel. Excel can have
multiple workbooks open in a single instance and you will not run into this
problem.

--
Regards,
Tom Ogilvy

In my present setup - I am running two instances of excel
and transfering data between the two via a huge pasted
link array; but have the idea that a vba program that
transmits the data a piece at a time would be more
efficient than the big pasted link.

That is why I am trying to figure out how to accomplish
the task I have been asking about. I figured if I could
get that little part to work, then I could write the macro
to accomplish the larger task.

But so far, I am unable to get vba in one instance to see
the other instance.

-----Original Message-----
I've been sitting here just ~assuming~ the whole time that Excel was
one of those application that didn't support multiple instances of
itself running at the same time. But, well, sure
enough
I just
opened a second instance of Excel with two separate process IDs.
Blushing. :]

The two instances are aware of each other though. Instance 2 opened
with Book4 as the default workbook name, as I already
had
1, 2, 3 in
the first instance. I then created book5 in instance
1,
went back to
instance 2, created another workbook, and that created
as
book6.
But I think you're probably right about what's going on.

Ray at work

"Jim Thomlinson"
message news:5DE756F1-953F-4197-B8FB- (e-mail address removed)...
Just a thought but is Research.xls open in a seperate instance of
Excel. If
so then it is possible that although research is open that the
macro can not
see it...



.


.
 
T

Tom Ogilvy

Just an idea - is it possible to use an excel style
address in a macro?
Sure.

ActiveCell.FormulaR1C1 = _
"=Excel.Sheet.8|'C:\Documents and Settings\trader1" & _
"\Desktop\research.xls'!'!Sheet1!R10C3:R3909C3'"

--
Regards,
Tom Ogilvy


Coyote said:
Just an idea - is it possible to use an excel style
address in a macro? The following is the address used by
excel for the big pasted link array that I was describing.

=Excel.Sheet.8|'C:\Documents and Settings\trader1
\Desktop\research.xls'!'!Sheet1!R10C3:R3909C3'

I am thinking that maybe if vba cannot see the
research.xls through its onw addressing - perhaps it might
be able to use the excel style.??



-----Original Message-----
In my present setup - I am running two instances of excel
and transfering data between the two via a huge pasted
link array; but have the idea that a vba program that
transmits the data a piece at a time would be more
efficient than the big pasted link.

That is why I am trying to figure out how to accomplish
the task I have been asking about. I figured if I could
get that little part to work, then I could write the macro
to accomplish the larger task.

But so far, I am unable to get vba in one instance to see
the other instance.

-----Original Message-----
I've been sitting here just ~assuming~ the whole time that Excel was
one of those application that didn't support multiple instances of
itself running at the same time. But, well, sure enough I just
opened a second instance of Excel with two separate process IDs.
Blushing. :]

The two instances are aware of each other though. Instance 2 opened
with Book4 as the default workbook name, as I already
had
1, 2, 3 in
the first instance. I then created book5 in instance 1, went back to
instance 2, created another workbook, and that created
as
book6.

But I think you're probably right about what's going on.

Ray at work

"Jim Thomlinson"
message (e-mail address removed)...
Just a thought but is Research.xls open in a seperate instance of
Excel. If
so then it is possible that although research is open that the
macro can not
see it...



.
.
 
G

Guest

Hi, the code needs to be on all one line:

If you need/want a single line of code to be on two or more lines you must
connect them with a space..then underscore...then hit return.

-Like this:

Application.Workbooks("research.xls").Worksheets _
("sheet1").Range("a1").ClearContents

-Hope this helps.

Jim S
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top