I need a little more specific help.

M

Markus

I posted this earlier and Ron DeBruin was kind enough to
direct me to some examples that he figured would help me.
Unfortunately I am not proficient enough to convert the
example for my personal use. Here is the Post I left
earlier.

I have several files named PG1Rep2004 to PG8Rep2004
I have another file called SiteReport that I would like to export
certain pieces of data from each book and place them on
a sheet in this new workbook("SiteReport"). I only want to use VB. I tried to use:

Worksheets("SR").Range("A8").Value = Workbooks
("PG1Rep2004").Worksheets("Calculator").Range("D1").Value
Worksheets("SR").Range("A9").Value = Workbooks
("PG22004").Worksheets("EvaluationCalculator").Range ("D1").Value

But this only works when the corresponding workbooks are
open. Unfortunatley I cant have all 8 PGRep workbooks
open at the same time. Is there vb to work around this
behavior?

To be more specific I acually use a List Box to clarify
the month and the referenced rownumbers increase by 40 for
each case in the listbox from the PG*Rep2004 files.

Example


Public Function WriteValues(TheCase As Integer)




Dim ls_Rangestringa As String



Dim ll_Rownumbera As Long


ll_Rownumbera = 1 + (TheCase * 40)


ls_Rangestringa = "D" + CStr(ll_Rownumbera)


Worksheets("SR").Range("A8").Value = Workbooks
("H:\MyDocuments\WorkInProgress\QARP2004
\ProgramReports\PG1Rep2004").Worksheets
("EvaluationCalculator").Range(ls_Rangestringa).Value



End Function
Basically I just want to be able to pull the information
from the PG*Rep2004 files without opening them and place
that into my function.
 
N

NickHK

Markus
See my response to your question further up, as you can just link to the
files.

NickHK
 

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