ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pass array from Project to Excel (https://www.excelbanter.com/excel-programming/294854-pass-array-project-excel.html)

Sarah[_5_]

Pass array from Project to Excel
 
All,

I have a timescale array in MS Project that looks like this:
Set TSV = ActiveCell.Resource.TimeScaleData(txtFromDt.Value,
txtToDt.Value, _
pjResourceTimescaledWorkAvailability, pjTimescaleDays)

I need to get this information into a table in Excel, and I don't
really understand much about arrays. I need the Resources listed down
the side (the rows), the date range listed across the top (the
columns), and the TimescaledWorkAvailability in the appropriate
intersecting cells. If anybody knows how to do this, I would
appreciate the help.

Thanks!
Sarah


Tom Ogilvy

Pass array from Project to Excel
 
I don't know anything about what is in your array, but assuming it is a 2D
array

set rng = Range("A1")
lb1 = lbound(TSV,1)
lb2 = lbound(TSV,2)
ub1 = ubound(TSV,1)
ub2 = ubound(TSV,2)
rng.Resize(ub1-lb1+1,ub2-lb2+1).Value = TSV

--
Regards,
Tom Ogilvy

"Sarah" wrote in message
om...
All,

I have a timescale array in MS Project that looks like this:
Set TSV = ActiveCell.Resource.TimeScaleData(txtFromDt.Value,
txtToDt.Value, _
pjResourceTimescaledWorkAvailability, pjTimescaleDays)

I need to get this information into a table in Excel, and I don't
really understand much about arrays. I need the Resources listed down
the side (the rows), the date range listed across the top (the
columns), and the TimescaledWorkAvailability in the appropriate
intersecting cells. If anybody knows how to do this, I would
appreciate the help.

Thanks!
Sarah




Jim Rech

Pass array from Project to Excel
 
I've never used MS Project and I have no idea what kind of data this is.
But I'd guess that you have to get it into an external form by copying it to
the Clipboard or saving it to a file, from which Excel can read it.

--
Jim Rech
Excel MVP
"Sarah" wrote in message
om...
| All,
|
| I have a timescale array in MS Project that looks like this:
| Set TSV = ActiveCell.Resource.TimeScaleData(txtFromDt.Value,
| txtToDt.Value, _
| pjResourceTimescaledWorkAvailability, pjTimescaleDays)
|
| I need to get this information into a table in Excel, and I don't
| really understand much about arrays. I need the Resources listed down
| the side (the rows), the date range listed across the top (the
| columns), and the TimescaledWorkAvailability in the appropriate
| intersecting cells. If anybody knows how to do this, I would
| appreciate the help.
|
| Thanks!
| Sarah
|




All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com