Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Help - appExcel statement

Status
Not open for further replies.

Dewey

Programmer
Jan 25, 2000
21
US
I can not figure out why this won't work.&nbsp;&nbsp;It must be something very simple.Option Explicit<br><br><br><br>Private Sub Command1_Click()<br>Dim i As Integer, j As Integer<br>Dim aryExcel()<br>Dim appExcel As Excel.Application<br>Set appExcel = New Excel.Application<br>ReDim aryExcel(7, 26)<br>appExcel.Workbooks.Open &quot;c:\reports\march00.worksheet01.xls&quot;<br><br>For i = 1 To 7<br>&nbsp;&nbsp;&nbsp;&nbsp;For j = 53 To 78<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aryExcel(i, j - 52) = appExcel.Range(Chr(i + 64)).Value<br>&nbsp;&nbsp;&nbsp;&nbsp;Next j<br>Next i<br>End Sub<br><br><br><br>Any help would be appreciated...............<br> <p>Dewey Davis<br><a href=mailto:ddavis@dfn.com>ddavis@dfn.com</a><br><a href= > </a><br>
 
In the following line the second range only has one value (it looks like a character) but there is no number (ie: A2)<br><br>aryExcel(i, j - 52) = appExcel.Range(<b>Chr(i + 64)</b>).Value <p>Colin Chevrier<br><a href=mailto:colin.chevrier@ca.jdsunph.com>colin.chevrier@ca.jdsunph.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top