TransferSpreadsheet Range Problem, Big Brain Needed!

  • Thread starter Thread starter CondtllyFrmttd
  • Start date Start date
C

CondtllyFrmttd

Ok, I know my problem is simple but I cannot figure it out. I am using
a the TransferSpreadsheet property, I do everything right until I
specify the range.

My worksheet's name is "Inventory Report" so I know that my range
specification needs quotes"". I needed columns A:G but everytime I use
that I get blank rows in my table.

Here is where I trip up:


transferspreadsheet,,,,,Range:="Inventory Report!a1:" + strInvEnd

So I want the sheet called Inventory Report from A1 to range I
specified in strInvEnd

Someone with a large brain help!!!!!
(I've got my Excel and Access Object Libraries & ActiveX so that's not
the problem)
Using XL 2003 + ACC2003
 
strInvEnd = "G"
transferspreadsheet,,,,,Range:="Inventory Report!A:" & strInvEnd

The + is a math operator. For concatenating strings, use &
Yes, it does work most of the time, but to be clear about what you are doing
sure there wont be a problem, use + for addition and & for concatenating
strings.
Also, if you leave out row numbers and only include the column letters, you
will get all the rows in the column that have data.
 
Back
Top